Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi,
For sheer simplicity, i have just one table called Calender with consecutive dates, year, month number, month name and day of week. In the slicer, i have selected the year as 2019. In the Table visual, i have dragged Year and Month Name from the Calender Table (the only table in the PBI file). I have then written a measure called Month of current row = MONTH(MIN(Calender[Date])). No problem so far. Now i want to rank the month names (in ascending order) by writing a measure. So the answer i am expecting to see is numbers from 1 to 12 (same as the month numbers). However, when i write this measure, then i get all 1's
Measure = RANKX(ALL(Calender[Month Name]),[Month of current row])
Where is my mistake?
Thank you for your help.
Solved! Go to Solution.
Measure =
RANKX (
ALL ( Dates[Month] ),
CALCULATE ( [Month of Current row], ALLEXCEPT ( Dates, Dates[Month] ) ),
,
ASC
)
Measure =
RANKX (
ALL ( Dates[Month] ),
CALCULATE ( [Month of Current row], ALLEXCEPT ( Dates, Dates[Month] ) ),
,
ASC
)
Thank you.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
| User | Count |
|---|---|
| 52 | |
| 41 | |
| 32 | |
| 26 | |
| 24 |
| User | Count |
|---|---|
| 132 | |
| 118 | |
| 57 | |
| 45 | |
| 43 |