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

Sorting and limiting bar chart

Dear All,

Please find attached a qvf, i which i want to limit the bars as below.

In Gross Margin bar chart

-> i want to show only those bars when its value is greater than 10%

-> want to Sort those bars by expression sum(Revenue) and llmit the bar nos to 2 only.

-> Dont want to use the filters, hence automatically wants to show the result for max(fmonthCD)

can you please guide here.

Sorting and limit.JPG

13 Replies
rbecher
Partner - Master III
Partner - Master III

This would be the 10% measure:

(sum({<Customers={"=(sum(Activity1)+sum(Activity2)+sum(Activity3)+sum(Pcost)+sum(Tcost))/sum(Revenue) >= 0.1"}>} Activity1) +

sum({<Customers={"=(sum(Activity1)+sum(Activity2)+sum(Activity3)+sum(Pcost)+sum(Tcost))/sum(Revenue) >= 0.1"}>} Activity2) +

sum({<Customers={"=(sum(Activity1)+sum(Activity2)+sum(Activity3)+sum(Pcost)+sum(Tcost))/sum(Revenue) >= 0.1"}>} Activity3) +

sum({<Customers={"=(sum(Activity1)+sum(Activity2)+sum(Activity3)+sum(Pcost)+sum(Tcost))/sum(Revenue) >= 0.1"}>} Pcost) +

sum({<Customers={"=(sum(Activity1)+sum(Activity2)+sum(Activity3)+sum(Pcost)+sum(Tcost))/sum(Revenue) >= 0.1"}>} Tcost))

/sum({<Customers={"=(sum(Activity1)+sum(Activity2)+sum(Activity3)+sum(Pcost)+sum(Tcost))/sum(Revenue) >= 0.1"}>} Revenue)

..but have no idea for the other two reqs.

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

yes , this expression is working perfectly fine.

But now how can i limits the no of bars to 2 with highest revenue based on sorting expression sum(Revenue)

rbecher
Partner - Master III
Partner - Master III

I know, but even a rank(sum(Revenue)) would not help..

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

any other suggestions??