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, I have this table:
- One Year has different Cycles
- There are some Teams with Points in those Cycles
I need to have the ranking of those teams based on the SUM of Points made in those particular Cycles:
In the example, Team B is the FIRST in Cycle 1 and SECOND in Cycle 2 for the same Year.
Which is the best way to have this Rank as a Calculated column?
Thanks
Solved! Go to Solution.
Try this:
Rank =
VAR YearSold = Cycles[Year]
VAR CycleNum = Cycles[Cycle]
VAR SameCycles =
FILTER ( Cycles, Cycles[Year] = YearSold && Cycles[Cycle] = CycleNum )
VAR Result =
RANKX ( SameCycles, Cycles[Points],, DESC )
RETURN
Result
Thank you, this can work. One detail is that I need to have the cumulate Points in the Year, so in the example, the sum of points to calculate ranking needs to be cumulative for the YEAR:
So the first Cycle of the YEAR stays equal but in Cycle 2 I am summing Cycle 1 & 2 , and so in th Cycle 3 I have to sum Cycles 1,2,3 and so on.
How would be the DAX adjustment?
Thanks a lot
Like this?
Hi Thanks , is almost like that but the TEAM needs to be consider to SUM the Points of each TEAM in the CUMULATIVE POINTS
Exactly , ranking bases on all the teams in one specific Round and Year
That's simple you could use this:
But the 40,35,7 values needs to appear only in the CYCLE 2, because the cumulative points are related to Campaign / Cycle/ Team
Like this?
@Anonymous , Try like
Year cycle team rank= RANKX(FILTER(ALL('Table'[Year],'Table'[Cycle],'Table'[Team]),'Table'[Year]=max('Table'[Year])
,'Table'[Cycle]=max('Table'[Cycle])),calculate(sum(table[CUMULATIVE POINTS])))
@Anonymous , this subcategory kind of rank. This series of blogs has an example for both Measure and column
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |