Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

aggr() function with selected dates

I have apivot table with the following dimension,


=if(vselect='sector' and (cdate >= vStartdate AND cdate <= vEnddate) , aggr(if(rank(count(sector))<=50,sector),sector))


but i am not getting the result for the range of dates chosen,

instead, it just aggregates the data for the maximum value of the date chosen, ie vEnddate


Please help me out. I cant figure out the issue.

2 Replies
Not applicable
Author

try this

=if(vselect='sector' and cdate >= vStartdate AND cdate <= vEnddate , aggr(if(rank(count(sector))<=50,sector),sector))

er_mohit
Master II
Master II

Try this in dimension side

aggr(if(rank(TOTAL count(sector))<=50,sector),sector)

OR TRY THIS

aggr(if(rank(TOTAL count(sector))<=50 AND vselect='sector' and cdate >= vStartdate AND cdate <= vEnddate

,sector),sector)