Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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!
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |