Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! 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
MVP
MVP

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.

Astrato.io Head of R&D
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
MVP
MVP

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

Astrato.io Head of R&D
Not applicable
Author

any other suggestions??