Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ishanbansal1204
Contributor III
Contributor III

Get the Values who has maximum number of occurences

Hi Experts,

I have a dataset,

Dim ADim BValueTotal CountRow Level count
W907123677222.37304264
W907123677220.830440

 

In this scenario, I want to display only one record for Dim A, Dim B based on the row level count

1. Display value for the row level count which has maximum number in the above case 264 is highest so 22.37 should be the output

2. If both the row level count values are same then display the minimum of Value

Please help.

Want to have this in load script.

1 Solution

Accepted Solutions
PriyankaShivhare
Creator II
Creator II

 

may Be like This

aggr(min(if(aggr(nodistinct max([Row Level count]),[Dim A],[Dim B])=[Row Level count],Value)),[Dim A],[Dim B])

PriyankaShivhare_0-1612782908833.png

 

Thanks,

Priyanka

View solution in original post

3 Replies
PriyankaShivhare
Creator II
Creator II

 

may Be like This

aggr(min(if(aggr(nodistinct max([Row Level count]),[Dim A],[Dim B])=[Row Level count],Value)),[Dim A],[Dim B])

PriyankaShivhare_0-1612782908833.png

 

Thanks,

Priyanka

ishanbansal1204
Contributor III
Contributor III
Author

Thank you very much.

ishanbansal1204
Contributor III
Contributor III
Author

Hi Priyanka,

Is there a way I can use this function in Load script rather than a measure.?

Thanks