Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys,
I'm really struggling with the following: How can I write the following Rankx Calculated Column as a Measure?
This should be the expected outcome. I have this as a calculated column, but due to performance-issues I need this as a measure.
organisation_id | Index | Rank |
1 | 1 | 1 |
1 | 2 | 2 |
1 | 3 | 3 |
2 | 4 | 1 |
2 | 5 | 2 |
3 | 6 | 1 |
3 | 7 | 2 |
3 | 8 | 3 |
4 | 9 | 1 |
5 | 10 | 1 |
5 | 11 | 2 |
5 | 12 | 3 |
5 | 13 | 4 |
Solved! Go to Solution.
Try this
IndexValue = SUM('Table'[Index])
Rank =
var _selectedID= SELECTEDVALUE('Table'[organisation_id])
var _rank=RANKX(FILTER(ALL('Table'),'Table'[organisation_id]=_selectedID),[IndexValue])
return _rank
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Try this
IndexValue = SUM('Table'[Index])
Rank =
var _selectedID= SELECTEDVALUE('Table'[organisation_id])
var _rank=RANKX(FILTER(ALL('Table'),'Table'[organisation_id]=_selectedID),[IndexValue],,ASC)
return _rank
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
have a look at this rankx textbook https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
Thanks. So far read and tried, it didn't solve my problem.
Try this
IndexValue = SUM('Table'[Index])
Rank =
var _selectedID= SELECTEDVALUE('Table'[organisation_id])
var _rank=RANKX(FILTER(ALL('Table'),'Table'[organisation_id]=_selectedID),[IndexValue])
return _rank
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
Try this
IndexValue = SUM('Table'[Index])
Rank =
var _selectedID= SELECTEDVALUE('Table'[organisation_id])
var _rank=RANKX(FILTER(ALL('Table'),'Table'[organisation_id]=_selectedID),[IndexValue],,ASC)
return _rank
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
yes, I did, thanks!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |