Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
wiz_nerd
Creator
Creator

Need to fix this expression for dimension expression.

=if(aggr(rank(if(not IsNull(fieldversion), fieldVersionDate)),groupname,fieldVersionDate) < 2,fieldversion)

I have this dimensional expression however the number of fieldversion result depends on  the "number" which is 2 in this expression.

 

however the scenario is the sometimes the fieldversion is empty with respect to field version date and so there are no  values. and sometimes its 2 as max return here is 2.

but I want only one last output of fieldversion in the dimension so for any value of number if there are n output I need only one last output  of fieldversion with respect to field version date..... per group name. 

Labels (3)
1 Reply
rubenmarin

Hi, I'm not sure to understand your issue... note that aggr will return  value for each combination of groupname and fieldVersionDate, maybe you need to count returned values for aggr:

=if(Count(aggr(rank(if(not IsNull(fieldversion), fieldVersionDate)),groupname,fieldVersionDate))2,fieldversion)