Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

Count by aggregation

Hi Experts,

Can any one please help me on below requirement in the UI can't modify the back-end script.

In the below sample source file i need to calculate the Count of Red Ind in the text box with the expression like  count of Red Ind aggregated by Metric Group and Metrics for all the Months.

Requirement with expected output:

By default, it should total red count for all months =10 based on unique Metric Group and Metrics            

if user select

June month then it will show >> 2 (as red count is repeated for Met 12 two time need to pick only 2 rows out of 3 rows in June month)

>> July -- 3

>> Aug -- 1

>> Sep -- 1

>> Oct --1

>> Nov -- 2

Please find the attched sample soure file Please provide the solution in the app.

Thanks in advance.

1 Solution

Accepted Solutions
sunny_talwar

May be this (again I don't understand why Aug = 1 and total is 10)... I would have thought the total to be 11 and Aug = 2

Sum(Aggr(Count(DISTINCT Metrics), MonthYear))

View solution in original post

2 Replies
Ralf_Heukäufer
Partner - Creator III
Partner - Creator III

Hello,

I don´t understand exactly how you come to a count of 10 and for august of a count of 1.

Would you count for a combination of metric group and metrics?

Then you can create a extra field in your load script like:

"Metric Group"&' '&Metrics as MandM,

And use

count(aggr([Red Ind],MandM))

to count it

In the other case you can use:

count(aggr(aggr("Red Ind",Metrics),[Metric Group]))


to aggregate both of them

sunny_talwar

May be this (again I don't understand why Aug = 1 and total is 10)... I would have thought the total to be 11 and Aug = 2

Sum(Aggr(Count(DISTINCT Metrics), MonthYear))