cancel
Showing results for 
Search instead for 
Did you mean: 

Aggregation for unique entires

Former Member
0 Kudos

Hello Experts,

I have requirement to show the number of complaints against Category.

Basically, my data looks like as follows:

Transaction NumberCategory ID 1Number
8000000008Billing1
8000000008Metering1
8000000009Collections1
8000000009CMP1
8000000010Metering1

I want to have table like below:

Category ID 1Number
Billing1
Metering2
Collections1
CMP0

Here, for transaction number 8000000008, there are two categories Billing and Metering and my requirement is to have a table with just Category and Number and for this transaction number either of the category should show 1. Similarly, if there are any other transaction numbers for that category it should those as well.

Basically, it should not consider the duplicate transaction numbers.

I have tried formula - Previous but it works when you have transaction number in the layout. If transaction number is removed from layout. it gives me #Multivalue error.

Any immediate help would be appreciated.

Thanks in advance!

Regards

Lavanya

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member210032
Active Participant
0 Kudos

Hi Jutla,

Category ID  Number

Billing1
Metering1
Collections1
CMP0

if your output like this see the below screenshot

Category ID   Number

Billing    1
Metering    2
Collections    1
CMP    0

if your output like this see the below screenshot


Regards

Mustafa

former_member210032
Active Participant
0 Kudos

Hi Jutla,

Create variable =max([number]  see the below screenshot





Regards

Mustafa

Former Member
0 Kudos

Hi Mustafa,

This too doesn't work

former_member201488
Contributor
0 Kudos

Why does the CMP category have a zero in your ideal output table? Surely this should be a one, due to transaction 8000000009?

Former Member
0 Kudos

Hi Neil,

My requirement is to display 1 for each transaction number even though the same transaction number has two different categories.

Any idea how can I achieve this?

former_member201488
Contributor
0 Kudos

Sorry, your requirement is still vague.

Looking at your example data, Transaction 8000000008 references two categories, and they both seemed to be reflected in your summarised output (metering & billing) However, Transaction 8000000009 also references two categories (collections & cmp), yet only one is referenced in the summarised output - cmp is zero?

If you only want to count each Transaction number once, irrespective of Category, then how do you decide which Categories to include and which to exclude? Alphabetical order?

Former Member
0 Kudos

Hi Neil,

Excluding any of the category should be ok.

Do you have any idea how to achieve this?

former_member201488
Contributor
0 Kudos

No, because you don't indicate the basis for the exclusion - how do you decide what to exclude and what to include?

Former Member
0 Kudos

Hi Neil,

Sorry, it seems i have given wrong output.

The output should be:

Billing1
Metering1
Collections1
CMP0
former_member201488
Contributor
0 Kudos

You're still not explaining the basis. To me, it looks like you're counting the FIRST Category ID from each Transaction, but there is no logic to their order - they're not in Alphabetical order, otherwise CMP would come before Collections for Transaction 8000000009.

If you don't explain the reasons behind your requirement, people are going to waste their time and yours suggesting mechanisms that may not be appropriate. Please save us all a lot of time and effort by clearly stating your requirements, with examples and how they are derived.

Former Member
0 Kudos

Hi Neil,

Please consider the categories to be taken in Alphabetical order.

Thanks.

Former Member
0 Kudos

Hi Lavanya,

You can create a block as follows:

Category Id    Number1

[Number1] could be defined as follows:

=Max([Number] ForEach ([Transaction Number]) )

This should display one Number value per transaction per Category.

Try and check if it helps.

Regards,

Yuvraj

Former Member
0 Kudos

Hi Yuvraj,

This does not work.

Any other idea?

Thanks

Lavanya

former_member203850
Contributor
0 Kudos

As you mentioned above , your data looks like :

Here declare Transaction number as dimenion to avoid aggregation at report level.

And Number field as measure and aggregation function : Sum

Once you remove Transaction number object from the report layout, then your data will looks like as follows:

Please check and let me know how it goes.

Regards,

Pranay

Former Member
0 Kudos

Hi Yuvraj,

This solution is not working.

Any other idea please?

saurabh_sonawane
Active Contributor
0 Kudos

=count(Category ID foreach (Transaction Number))

or

=count(Category ID IN (Transaction Number))