The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello All.
I created a column called Month, which takes just the Month of an order date in my data.
So it looks like this:
Order Date: Month
3rd January 2018 January
28th February 2018 February
1st March 2018 March
2nd March 2018 March
2nd March 2018 March
When I add a slicer to my report it lists the month in alphabetical order.
So the slicer shows:
All
February
January
March
How can I rearrange that to be in the correct month order?
Many thanks.
Solved! Go to Solution.
Hi there Ianwuk,
In order to display months in the correct order, you'll have to add a reference ID column that refers to the month names with numbers.
Month MonthNumber
January 1
Febuary 2
March 3
April 4
Then sort the month column by MonthNumber in the modelling tab in the Data Model. This should re-arrange the months by calendar instead of alphabetically.
You can use the following function on your OrderDate column after ensuring that it is in the date format. Using the below formula will return an integer value for every month in your date table.
New Column Name = MONTH ( 'Calendar Dates'[Date Format] )
Hope this helps.
Hi there Ianwuk,
In order to display months in the correct order, you'll have to add a reference ID column that refers to the month names with numbers.
Month MonthNumber
January 1
Febuary 2
March 3
April 4
Then sort the month column by MonthNumber in the modelling tab in the Data Model. This should re-arrange the months by calendar instead of alphabetically.
You can use the following function on your OrderDate column after ensuring that it is in the date format. Using the below formula will return an integer value for every month in your date table.
New Column Name = MONTH ( 'Calendar Dates'[Date Format] )
Hope this helps.