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! Get ahead of the game and start preparing now! Learn more
Hi,
Need your help regarding sorting, I want the months to sort from Apr to Mar (FY).
Please help me with the Dax.
TIA.
Solved! Go to Solution.
Hi @Anonymous ,
Try to create a sort column:
sort = IF(AND(
YEAR('Table'[Date])=YEAR(TODAY())-1 ,MONTH('Table'[Date])>3) ||
AND(
YEAR('Table'[Date])=YEAR(TODAY()) , MONTH('Table'[Date])<4),format(YEAR('Table'[Date])*100+MONTH('Table'[Date]),"000000"),RIGHT('Table'[FY],4))
Change the format of this column to whole number,then sort FY-Month by this column.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Try to create a sort column:
sort = IF(AND(
YEAR('Table'[Date])=YEAR(TODAY())-1 ,MONTH('Table'[Date])>3) ||
AND(
YEAR('Table'[Date])=YEAR(TODAY()) , MONTH('Table'[Date])<4),format(YEAR('Table'[Date])*100+MONTH('Table'[Date]),"000000"),RIGHT('Table'[FY],4))
Change the format of this column to whole number,then sort FY-Month by this column.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you so much!! It worked!!
Hi,
Thank you for your quick response.
I have created the column
based on the columns below
Hi, @Anonymous
Please check this example:
https://www.dropbox.com/s/o20j4ej8t4kc0bv/FY-Month%20sort%28allure-analytics.com%29.pbix?dl=0
I suggest that you have a Calendar table with Date column (calendar date).
You should probably have Year column (number format) and Month number (1 for Jan, etc) - number format
You need to create a Fiscal Year and Fiscal month number calculated columns based on this.
Did I answer your question? Please Like and Mark my post as a solution if it solves your issue. Thanks.
Appreciate your Kudos !!!
https://www.youtube.com/channel/UCndD_QZVNB_JWYLEmP6KrpA
https://www.linkedin.com/company/77757292/
Proud to be a Super User!
@Anonymous ,
Month Year = FORMAT([Date],"mmm-yyyy")
Month Year sort = if(month([Date]) <=4, (YEAR([Date]) -1)*100 + month([Date]) +9, (YEAR([Date]) )*100 + month([Date]) -3)
Sort month year of month year sort
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
Hi,
Thank you for your response.
My FY_Month Column contains the following value and I want to sort that
It Includes the year too. Once the current FY ends it will change into 2021-22 and then it should start with Apr for the next year. That query is working fine, But I can't sort the month.
Please help.
TIA
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 36 | |
| 32 | |
| 31 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 86 | |
| 85 | |
| 68 | |
| 64 |