Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi-
I am looking only to show the top 10 items by sales. I have tried using Limitation on a dimension, but it does not work for some reason. Is there another formula I can add something to this expression below? (This is my Sales expression):
Sum({<[Week Ending]={'$(=Max([Week Ending]))'}>}[Retail Sales])
Here is a screen shot, I only want the top 10 to show
Thank you!
You should be able to use the Rank function to get what you want.
Your expression returns all sale sums:
Sum({<[Week Ending]={'$(=Max([Week Ending]))'}>}[Retail Sales])
Make that
Rank(Sum({<[Week Ending]={'$(=Max([Week Ending]))'}>}[Retail Sales]))
To return the sales Rank, then put that in an IF to return the original values IF the rank is <11:
=If(Rank(Sum({<[Week Ending]={'$(=Max([Week Ending]))'}>}[Retail Sales])) <=10, Sum({<[Week Ending]={'$(=Max([Week Ending]))'}>}[Retail Sales]))
Does that work?
Also look into the Rank documentation because there are some caveats on how the Rank function works; you might find you are getting more than 10, if for example you have two items that are tied.