Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sunny_talwar

Seems to be working for me

Capture.PNG

View solution in original post

31 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

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

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sunny_talwar

I think based on the Spend column

sunny_talwar

May be this:

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

sunny_talwar

or

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

Not applicable
Author

Thanks for your assistance, but both are not working.

Not applicable
Author

You have any other formula?

sunny_talwar

Seems to be working for me

Capture.PNG

Not applicable
Author

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?

sunny_talwar

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