Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
igorgois_
Partner - Creator
Partner - Creator

Firstsortedvalue with nested aggregation

I am trying to user firstsortedvalue function in a KPI object.

I would like to see in the KPI the day-hour with the highest sum(kpi) value. In the example below will be "tuesday-3" (the sum(kpi) is 120.

I tried FirstSortedValue(day & '-' & hour,sum(kpi)) but got a "nested aggregation not allowed error" and then I tried FirstSortedValue(day & '-' & hour,-aggr(sum(kpi),day & '-' & hour)) without success.

Does anyone can help me?

Thanks in advance

load * inline
[
day,hour,kpi
monday,1,10
monday,1,10
monday,1,10
monday,2,11
monday,2,11
monday,2,11
tuesday,1,5
tuesday,2,5
tuesday,3,40
tuesday,3,40
tuesday,3,40
wednesday,1,5
wednesday,2,5
wednesday,3,5
];

Labels (2)
0 Replies