Forum Discussion
Modification to Time intelligence measure
this problem is generic when you use ranking... there seems to also be a generic solution
1) take the number you want to rank
2) multiply it by 1000
3) add the result of calling RANDBETWEEN(0,999)
the extra three digits should mean that you will no longer have duplicate numbers in the column you are trying to rank
so your code
RANKX(
ALLSELECTED(Summary),
CALCULATE(SUM(Summary[Count Links (Last Month -2)])),might change the expression inside the SUM
to be
(Summary[Count Links (Last month -1)] * 1000) + RANDBETWEEN(0,999)
I'm a personal Power Bi Trainer I learn something every time I answer a question
The Golden Rules for Power BI
- Use a Calendar table. A custom Date tables is preferable to using the automatic date/time handling capabilities of Power BI. https://www.youtube.com/watch?v=FxiAYGbCfAQ
- Build your data model as a Star Schema. Creating a star schema in Power BI is the best practice to improve performance and more importantly, to ensure accurate results! https://www.youtube.com/watch?v=1Kilya6aUQw
- Use a small set up sample data when developing. When building your measures and calculated columns always use a small amount of sample data so that it will be easier to confirm that you are getting the right numbers.
- Store all your intermediate calculations in VARs when you’re writing measures. You can return these intermediate VARs instead of your final result to check on your steps along the way.
Thanks for the respons kentyler - I'm getting the following error, am I doing something obviously wrong?
- kentyler6 years agoSolution Sage
You might have to do the multiplication in a calculated column in the table.
- Anonymous6 years agoNot applicable
Thanks, but I'm not sure this is what I need. I've only partially played around with your suggestion, but it seems to have the effect of randomizing the results to a degree, rather than creating a unique ranking based on a series of rules: