Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I have data sents for a Category, Date, and a Number field. What I want to do is make a Measure to Rank the categories based on the date slicers chosen on the display. Basically what I need is:
Category Value Rank
And the columns for Value and Rank adjust as I select Days, Months, Years, Etc. So the default view is sum of everything, but then I want to see the ranks for the month of April in 2016, and it shows the totals and the rank of the adjusted totals for that month.
So far everything I tried just gives me 1s for everyone's Rank or I get an error.
Thank you
Solved! Go to Solution.
Please use the measure below.
SumValue = SUM(Table1[Value])
Rank = IF(
HASONEVALUE(Table1[Month])
,RANKX(ALLEXCEPT(Table1,Table1[Month]),Table1[SumValue])
)
Please use the measure below.
SumValue = SUM(Table1[Value])
Rank = IF(
HASONEVALUE(Table1[Month])
,RANKX(ALLEXCEPT(Table1,Table1[Month]),Table1[SumValue])
)
Hi @andrewa712,
Your rank measure should look something like this:
Rank = RANKX(ALLSELECTED(Table[Category]),CALCULATE(sum(Table[Value])))
Doing this you will have a rank based on the selected values from table (slicer of date) and the sum of the value.
Please be aware if you place any other field in your table than the Category for making the aggregations your rank will be always 1.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUser | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |