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

Qlik Sense - FirstSortedValue and Aggr

Hello - having an issue with FirstSortedValue and Aggr function. In the example below, I'm trying to identify the earliest month. I'm expecting that FirstSortedValue should be 201911 but formula is returning 201912. Any ideas? Thanks.

CASE_AER_NUMBER_VERSIONYearMonthNumaggr(min(YearMonthNum), CASE_AER_NUMBER_VERSION)FirstSortedValue(  YearMonthNum, aggr(min(YearMonthNum), CASE_AER_NUMBER_VERSION))
20151234567 (55)201911201911-
20151234567 (55)201912-201912
Labels (2)
10 Replies
tomdon14
Contributor III
Contributor III
Author

Thanks Sunny. I resolved it as follows with help from a different post of yours 😊

(https://community.qlik.com/t5/QlikView-Creating-Analytics/Using-set-analysis-aggregation/td-p/146172...)

YearMonthCASE_AER_NUMBER_VERSIONsum(Aggr(if(YearMonthNum = Min({<YearMonth=>} TOTAL <CASE_AER_NUMBER_VERSION> YearMonthNum),1,0),CASE_AER_NUMBER_VERSION, YearMonthNum))
Nov-201920151234567 (55)1