Forum Discussion
Power BI desktop - Handling Ties using DAX measure/ RANK
- 9 months ago
Hi Amudha_Kumaran ,
Thanks for the clarification. Based on the behavior you’re seeing, it’s clear that Activity_ID, Days, Counterparty, and all other columns can still repeat, meaning there is no unique row identifier anywhere in the model. When that happens, DAX has no way to distinguish those duplicate rows. A measure can only evaluate values at the column level, it cannot see the underlying physical row or row order inside the engine. Because of this, DAX cannot reliably “pick one random row” when two or more rows are completely identical across every available column.
Since you are also working with a Live Connection, calculated columns and calculated tables are not an option. That leaves only two feasible and supportable solutions:
1. Add a surrogate key / row identifier in the source model
2. Adjust the requirement to a higher grainIf you can add that key, I can provide a clean, simplified RANK-based measure that will give you exactly one Max-Days row per Activity_ID.
Hope this helps.
Thank you.
Hi Amudha_Kumaran ,
May I ask if you have resolved this issue? Please let us know, if you have any further issues please provide the sample data, we are happy to help.
Thank you.