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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Aanchal
Contributor II
Contributor II

Limit top 10 By measure (Set Expression)

Dear , 

This is my set Expression

=count({<[Date Stamp] ={">=$(=Date(Today()-90,'DD-MM-YYYY'))<=$(=Date(today(),'DD-MM-YYYY'))"}>}[Color Priority])

for total no. of colour instances   i have to show top 10 . 

i used this expression 

=Aggr(Rank(count({<[Date Stamp] ={">=$(=Date(Today()-90,'DD-MM-YYYY'))<=$(=Date(today(),'DD-MM-YYYY'))"}>}[Color Priority])) <=10,[Color Priority])

Its not working . Please Suggest.

Labels (1)
15 Replies
SunilChauhan
Champion II
Champion II

Have you tried this?

 

IF(Aggr(Rank(count({<[Date Stamp] ={">=$(=Date(Today()-90,'DD-MM-YYYY'))<=$(=Date(today(),'DD-MM-YYYY'))"}>}[Color Priority])),[SKU Code],[Color Priority]) <=10,count({<[Date Stamp] ={">=$(=Date(Today()-90,'DD-MM-YYYY'))<=$(=Date(today(),'DD-MM-YYYY'))"}>}[Color Priority]))

Sunil Chauhan
Aanchal
Contributor II
Contributor II
Author

Yes , this is not limiting to top 10 .

BrunPierre
Partner - Master II
Partner - Master II

@Aanchal  Try this

IF(RANK( Count(Aggr(Count([Color Priority])),[SKU Code]))<=10,Count([Color Priority]))

Aanchal
Contributor II
Contributor II
Author

Aanchal_0-1662011759323.png

 

BrunPierre
Partner - Master II
Partner - Master II

This instead

IF(RANK(Count(aggr(Count([Color Priority]),[SKU Code],[Color Priority])))<=10,Count([Color Priority]))

 

Aanchal
Contributor II
Contributor II
Author

No, not working.