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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort / filter field

Hello,

Would you please let me know how I would handle filtering a field (for example a client number) so that I can display the top "N" of it in a chart by different dimensions (for example, by product or region or revenue size)?  I know that I can limit the display on the dimension limits page by using the "Restrict which values are displayed..." but it still has to sort through all the values in order to limit by order so is there a way to limit the amount it sorts through first, please?

Thank you

Labels (1)
3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

No, there isn't. If you want a Top N, then the values will be sorted first. If you want to restrict values by other criteria first, for example the values for only one region, then make the appropriate selections first.


talk is cheap, supply exceeds demand
rbecher
Partner - Master III
Partner - Master III

You could probably use a dynamic set analysis with a variable to filter different dimensions in this way:

=sum({<$(vDimension)={'$(vDimValue)'}>} MeasureField)

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine
Not applicable
Author

Thank you!  I did end up using set analysis that looked something like this:

Sum({<Client={"=Rank(Sum($(Sales)),4)<=$(vTopN)"}>} $(Sales))