Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello Everyone,
I want to rank a set of dates from 1 to 13, once 13 as been reached, I would like the rank to start over again at one and keep on doing this until the end of my time period.
1/1/18 : rank 1
1/2/18: rank 2
.
.
.
1/13/18: rank 13
1/14/18: rank 1
1/14/18: rank 2
Is this possible?
Solved! Go to Solution.
Try this:
Ranking - TRUNC((Ranking-1)/13,0) * 13
Ranking is your RANKX() measure.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingIf you already have a [Rank] measure then this should work:
Column 2 = VAR __mod = MOD([Rank],13) RETURN IF(__mod=0,13,__mod)
Try this:
Ranking - TRUNC((Ranking-1)/13,0) * 13
Ranking is your RANKX() measure.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThey both works! Thank you!
I created a similar measure to this here: https://community.powerbi.com/t5/Quick-Measures-Gallery/Cthulhu/m-p/509739
Probably could do something similar with RANKX but I'd need sample data. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
If you already have a [Rank] measure then this should work:
Column 2 = VAR __mod = MOD([Rank],13) RETURN IF(__mod=0,13,__mod)
User | Count |
---|---|
98 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
59 |