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.
Hello everyone
I have the following table:
Date | Day | Year_Month | Aux |
29/11/2022 | 29 | 202249 | 2022491129 |
30/11/2022 | 30 | 202249 | 2022491130 |
1/12/2022 | 1 | 202249 | 2022491201 |
2/12/2022 | 2 | 202249 | 2022491202 |
3/12/2022 | 3 | 202249 | 2022491203 |
4/12/2022 | 4 | 202250 | 2022501204 |
5/12/2022 | 5 | 202250 | 2022501205 |
6/12/2022 | 6 | 202250 | 2022501206 |
-->Date-->dd/mm/yyyy
So, my idea is to get the ranking by the group "Year_Month", To achieve it, I used this:
Rank =
var = variable = 'Table'[Year_Month]
return
RANKX(FILTER('Table', 'Table'[Year_Month]=variable ), 'Table'[Aux],, ASC, DENSE)
Date | Day | Year_Month | Aux | Rank |
29/11/2022 | 29 | 202249 | 2022491129 | 1 |
30/11/2022 | 30 | 202249 | 2022491130 | 2 |
1/12/2022 | 1 | 202249 | 2022491201 | 3 |
2/12/2022 | 2 | 202249 | 2022491202 | 4 |
3/12/2022 | 3 | 202249 | 2022491203 | 6 |
4/12/2022 | 4 | 202250 | 2022501204 | 1 |
5/12/2022 | 5 | 202250 | 2022501205 | 2 |
6/12/2022 | 6 | 202250 | 2022501206 | 3 |
That's ok. Now I want to get the same but without using the Aux column. I've tried, using functions like EARLIER, but unsuccessfully. Does anyone have any idea how to do it?
Thank you
PS: I highlighted some columns because the numbers were too close to each other and could be difficult to read
Solved! Go to Solution.
@cris1196 Try:
Rank Column = RANKX(FILTER('Table',[Year_Month] = EARLIER('Table'[Year_Month])),[Date],,ASC, DENSE)
@cris1196 Try:
Rank Column = RANKX(FILTER('Table',[Year_Month] = EARLIER('Table'[Year_Month])),[Date],,ASC, DENSE)
!It worked. I really need to practice the rankx function more... Thanks!
@cris1196 Don't feel bad: To *Bleep* with RANKX! - Microsoft Power BI Community
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |