Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
eaphymaoweave
Contributor II
Contributor II

Aggregation Function?

Capture.JPG

 

 

 

I'm trying to create the table above. Group and Item are dimensions. % is a measure calculated as the average value of binary column at the item level. How can I create the Max% column where it shows the maximum % of each Group?

 

I feel like it should be an aggregation function, but i'm really struggling to get anything to work. Any help would be greatly appreciated!

4 Replies
zzyjordan
Creator II
Creator II

Hi, there

Check this expression highlighted in yellow

Capture.JPG

Hope this helps

ZZ

 

Shubu005
Contributor II
Contributor II

use this expression in a straight table with your dimensions:

=aggr(NODISTINCT max(%),Group)

 

Final OutputFinal OutputDimensionsDimensionsExpressionExpression

eaphymaoweave
Contributor II
Contributor II
Author

The challenge is that % isn't the lowest level of aggregation. The % is calculated as Avg(% Flag).

% Flag is a column made up of 1 and 0 values.

I'm trying =aggr(NODISTINCT max(Avg([% Flag])),Group) but it's just returning null values.
Shubu005
Contributor II
Contributor II

Then If you are using % as expression before calculating MAX, then you can use the column name instead of formula and check.

Example:
=aggr(NODISTINCT max(column(1)),Group)