Forum Discussion
Getting TOP n Items in a Table/chart
paresh its really late here and I'm reading this on my iPad so I can't test it right now but...
try creating a TOTALYTD Measure (or some kind of a running total) instead of just SUM
so when you select February it will aggregate YTD up to and including February
(allow only single select for the Month Slicer - so think of the slicer as up to and including selected Month)
and then rank the items based on this measure
hope this works - let me know...
Thanks Sean for replying (even though it late in your time zone)
I cannot dictate the time period as a specific month or upto a month. It could be 2 disconnected months also or it could be a couple of days. That will be totally upto the end user.
Hope you understand.
- Sean10 years agoCommunity Champion
paresh to get only 1 rank (per item) you still need to aggregate the [quantity] for all selected dates
so your measure should look something like this...
Msr_SaleQty = CALCULATE ( SUM ( 'sales'[quantity] ), ALLSELECTED ( 'table'[date] ) )
And then RANK all items based on this Measure
- paresh10 years agoFrequent Visitor
Thanks once again.
However, no change in the results.
- Sean10 years agoCommunity Champion
paresh To achieve what you want you have to remove the [Date] field your from your table
even if you aggregate the data wtih YTD or a Running Total it will still be broken down by month (like in the Matrix below)
the Slicers will indicate to your user what is selected - then you can select any date range(s) you want...