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: 
abhaysingh
Specialist II
Specialist II

Logic Help...

hi all,

i have to show site name, the site which is best...

i bar chart i tool dimension Site and count(SiteId) as Measure..

i want the best site and worst site name to display in text box..

How i can do this?

Labels (1)
4 Replies
Kushal_Chawda
MVP
MVP

For worst site  below expression in Text object

=Firstsortedvalue(Site, aggr(Count(SiteID), Site) &':' & Firstsortedvalue(sum(aggr(Count(SiteID), Site)), aggr(Count(SiteID),Site))

For Best site  below expression in Text object

=Firstsortedvalue(Site, -aggr(Count(SiteID), Site) &':' & Firstsortedvalue(sum(aggr(Count(SiteID), Site)), -aggr(Count(SiteID),Site))

abhaysingh
Specialist II
Specialist II
Author

hi,

what is the error in expression?

Kushal_Chawda
MVP
MVP

one bracket is missing. Try this

=Firstsortedvalue(Site, aggr(Count(SiteID), Site)) &':' & Firstsortedvalue(sum(aggr(Count(SiteID), Site)), aggr(Count(SiteID),Site))

For Best site  below expression in Text object

=Firstsortedvalue(Site, -aggr(Count(SiteID), Site)) &':' & Firstsortedvalue(sum(aggr(Count(SiteID), Site)), -aggr(Count(SiteID),Site))

abhaysingh
Specialist II
Specialist II
Author

still error