Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

How to sort items based on spend and i need figures based on savings in the pie-chart

How to sort items based on spend and i need figures based on savings in the pie-chart.I want to sort only top 3 items and  this is my table


 

Item ID SpendSavings
1112012
1214014
139040
143016
1518018
166030
1711017
18408
1913025
2016010

So pie-chart answer should be like this                                          and NOT like this

Item ID      Savings                                                                 Item ID      Savings

15                18                                                                          13             40

20                10                                                                          16             30

12                14                                                                          19             25

Thanks in advance

Regards

Nagarjuna

1 Solution

Accepted Solutions
MVP
MVP

Re: How to sort items based on spend and i need figures based on savings in the pie-chart

Seems to be working for me

Capture.PNG

31 Replies
MVP
MVP

Re: How to sort items based on spend and i need figures based on savings in the pie-chart

How do you get the top 3 to be 15, 20, 12?

MVP
MVP

Re: How to sort items based on spend and i need figures based on savings in the pie-chart

I think based on the Spend column

MVP
MVP

Re: How to sort items based on spend and i need figures based on savings in the pie-chart

May be this:

If(Rank(Sum(Spend)) < 4, Sum(Savings))

MVP
MVP

Re: How to sort items based on spend and i need figures based on savings in the pie-chart

or

Sum({<[Item ID] = {"=Rank(Sum(Spend)) < 4"}>}Savings)

Not applicable

Re: How to sort items based on spend and i need figures based on savings in the pie-chart

Thanks for your assistance, but both are not working.

Not applicable

Re: How to sort items based on spend and i need figures based on savings in the pie-chart

You have any other formula?

MVP
MVP

Re: How to sort items based on spend and i need figures based on savings in the pie-chart

Seems to be working for me

Capture.PNG

Not applicable

Re: How to sort items based on spend and i need figures based on savings in the pie-chart

I have multiple spend amounts and multiple saving amounts for the same item, sorted top 3 items using table based on spend, so all spends and savings came  to one one number for one item, then i tried the above  formula but it is showing based on top 3 savings only. Is this because of multiple spends and savings?

MVP
MVP

Re: How to sort items based on spend and i need figures based on savings in the pie-chart

I don't think it should be a problem, but if you are able to share a sample where you see an issue, we can dig deeper into it