Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I am working on a measure that will return the best performing Month and then I need to divide it by the whole year. The Best Month is simply the month with the highest price sum. I have order duplicates, since one order can have multiple items with different prices.
I have searched online, but I'm still unable to get this.
My Data is something like this:
@Anonymous , create a rank like this and filter rank =1
rankx(filter(allselected(Table[Year], Table[Month]), Table[Year] = max(Table[Year])), calculate(Sum(Table[price])),,desc,dense)
Measure Rank: https://www.youtube.com/watch?v=DZb_6j6WuZ0&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=40
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
h
Hi, @amitchandak, I tried your solution, but it didn't really work. I created two columns for the year and month and substituted them in the formula, but in the end it returned 1 for everything. I tried to mess around with the formula to try to make it work, but I was unsuccessful to do so.