Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I've made a calculated column for Month and year and It's showing as below:
The sorting is not correct it seems. I want the Month and Year to be sorted.
Desired Output
| Deal | Month Year |
| xyz | Jan'2025 |
| xyz | Feb'2025 |
| xyz | Jan'2026 |
| xyz | Feb'2026 |
How can I get the sorting right? Present I've sorted month year by Month.
Below are the formulas I've used:
Solved! Go to Solution.
Hi @Anonymous
Create your column as actual dates and then they will sort properly.
Try this to create the column
Month Year = DATE(YEAR(VIEW_FORECASTREVENUE[EXPECTEDINMONTH]), VIEW_FORECASTREVENUE[Month], 1)
You should get a column of type DateTime that should sort chronologically
Regards
Phil
Proud to be a Super User!
Hi @Anonymous
You can create a numeric key like 202101 for January 2021 and then use this column for sorting the Month-Year column using the sort by column option.
HI @Anonymous ,
See if this helps
https://community.powerbi.com/t5/Desktop/how-to-sort-Date-MonthYear-column/td-p/102700
https://community.powerbi.com/t5/Desktop/Sorting-of-Month-Year/td-p/500324
Basically you need to create a Index Column and then sort your Month Year Column via the index colum created.
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi @Anonymous
You can create a numeric key like 202101 for January 2021 and then use this column for sorting the Month-Year column using the sort by column option.
Thanks it solved my issue.
Regards,
Himanshu
Hi @Anonymous
Create your column as actual dates and then they will sort properly.
Try this to create the column
Month Year = DATE(YEAR(VIEW_FORECASTREVENUE[EXPECTEDINMONTH]), VIEW_FORECASTREVENUE[Month], 1)
You should get a column of type DateTime that should sort chronologically
Regards
Phil
Proud to be a Super User!
Thank you !!!
It resolved my issue.
Regards,
Himanshu
Can you please show what actually you mean by "Actual dates". It is not clear to me.
Regards
@Anonymous
Just added an example of how to create the dates based on your data.
Month Year = DATE(YEAR(VIEW_FORECASTREVENUE[EXPECTEDINMONTH]), VIEW_FORECASTREVENUE[Month], 1)
Regards
Phil
Proud to be a Super User!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 64 | |
| 31 | |
| 29 | |
| 24 |