Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Thank you in advance
Solved! Go to Solution.
To calculate Rank you can try:
RankBranch =
RANKX(
ALL('YourTable'),
CALCULATE(
[Variance%] +
DIVIDE([sumGroups], 1000000) +
DIVIDE([sumPO], 1000000000000)
),
,
DESC,
DENSE
)
This should break ties in the desired manner. Let me know if it works for your scenario!
If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
To calculate Rank you can try:
RankBranch =
RANKX(
ALL('YourTable'),
CALCULATE(
[Variance%] +
DIVIDE([sumGroups], 1000000) +
DIVIDE([sumPO], 1000000000000)
),
,
DESC,
DENSE
)
This should break ties in the desired manner. Let me know if it works for your scenario!
If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Thank you very much @Kedar_Pande
It works! I only had to add * 1000 to the Variance % measure as the measure seemed to not read decimals correctly.
Hi!
So it looks like you have the right idea in your measure. You use Variance % as a base and then want to use small weights to break ties. The issue, I think, is that you first calculate the RANKX() of only Variance %, and only then add conditions with small weights. But by then, the rank is already decided.
You have a long DAX statement there so I might have missed something here, but I hope you see the principle of what I think you can do below. Add all the factors in the first RANKX(). If only Variance % is needed it doesn't matter that the small weights are there, but if you need them they are applied instantly. As a bonus, it would make the entire statement a lot shorter, too.
Try it out and let me know how it went!
budgetRank =
IF(
ISBLANK([Variance %]),
BLANK(), -- Show blank for rows with blank measure results
RANKX(
FILTER(
ALLSELECTED('Centre details'[Branch Description]),
NOT(ISBLANK([Variance %])) -- Only rank non-blank rows
),
[Variance %] + -- Main rank decider
[sumGroups] * 0.0001 + -- Second rank decider
[sumPO] * 0.000001, -- Third rank decider
,
DESC, -- Rank in descending order
DENSE
)
)
Thank you very much @TomasAndersson
It works! I only had to add * 1000 to the Variance % measure as the measure seemed to not read decimals correctly.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
108 | |
102 | |
94 | |
71 |
User | Count |
---|---|
173 | |
134 | |
132 | |
102 | |
95 |