March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hey Mates ....
I have been trying to build a report where I'm stucked with a issue like month names are not in order ,even after sorting and tried many ways to sort ,by transforming data,adding new col,slicing blah blah ...still didnt yet solved.
Kindly suggest the solution.
Observe tht image where in X-axis month names are not in order .Thats the Issue ,I'm facing.
Thanks ..!
Hi @sailochanar ,
By using switch function u can create new column and add these new field to the existing filed then apply sorting then it will return.
FYR-
Thanks & Regards,
Madhan Reddy
You can follow below steps:
1)you can add a new column in Power Query Editor or using DAX to represent the monthnumber..
MonthNumber =
SWITCH(
[Month],
"Jan'23", 1,
"Feb'23", 2,
"Mar'23", 3,
"Apr'23", 4,
"May'23", 5,
"Jun'23", 6,
"Jul'23", 7,
"Aug'23", 8,
"Sep'23", 9,
"Oct'23", 10,
"Nov'23", 11,
"Dec'23", 12,
BLANK()
)
Create a column format in Year-Month (format(your date column),"YYYY-MMM") , like 2024-07 and sort by ascending order.
Or create another column (let sy column A) with your desired order, then sort your original column by column A.
I splitted the month column which is filled with Jan'23,Feb'23....so on ,and added another column with Month_number and merged all three. still even after sorting with mnth number also it is not getting sorted . Please suggest a simple way if possible.
Hello @sailochanar! Do you have a calendar table? If so my suggestion would be to have a numeric column of month year where, for example, dec23 would be 1223 and june23 0623. Then you can order the original column based on the numeric one.
Nope I just have month attribute ,Yeah I even created that as u said for Dec23-1223..But still the order is not sorted.(Splitting column ,conditions...) still not solved.
Can you explain how you sorted using that column that I suggested? Or maybe share the report
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
132 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
203 | |
141 | |
107 | |
73 | |
70 |