I want to create a rank grouping by month and category using dax. Basically, like that:
I’ve tried the following code, but it returns the row sale and not the rank:
TOP 10 =
CALCULATE([Total Sales],
topn(10, ALLSELECTED(category),[Total Sales]),
values(category)
)
Can someone explain how to create that rank and why this code was returning the sales value of each line and not the rank?