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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Good afternoon!
Could you help me with measure to sort by "year & month" ascending?
Now it doesn't work as wish to get
I want to get the next:
202201 - 1
202202 - 2
...
202303 - 13
and so on
dax file:
https://disk.yandex.ru/d/B1gobUijeWcvDw
Hi @Anonymous ,
Please try:
RangeMonthYear =
var _a = RANKX(ALL('Календарь'),[Сорт Год_Мес],SELECTEDVALUE('Календарь'[Сорт Год_Мес]),ASC,Dense)
return SELECTEDVALUE('Календарь'[Сорт Год_Мес])&" - "&_a
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hello i have another work around create a month id new column to the atbel
Month ID =
VAR _min = YEAR(MIN('Table'[Date]))
RETURN
MONTH('Table'[Date]) + (YEAR('Table'[Date]) - _min) *12
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
7 | |
4 | |
3 |
User | Count |
---|---|
15 | |
14 | |
12 | |
10 | |
9 |