Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I got a maybe silly question...
I have converted the Month to MMM format (because it looks better on the visual), appearently it changed the data type to Text and now it's sorting by Alphbatically order with Apr as the first column in my visual.
Is there a way to change the sorting order back to date while using the MMM format on visual?
Thank you!!
Solved! Go to Solution.
Hi @NewbieYR ,
A text column can be custom sorted by another column
To create a month sort column in DAX, you may use MONTH(Table[Date]).
In Power Query, go to Add Columns tab, highlight the dates column, go to Date then Month. This will create a column of month number where January is 1 and December is 12.
More info on custom column sort - https://radacad.com/sort-a-column-with-a-custom-order-in-power-bi
Proud to be a Super User!
Hi,
If you have Month as a number in your column list, you could sort the particular column MMM based on the number month column.
Add the below code to create a new column in the table as a month number :
'Monthnumber = "Month",MONTH([Date table])'
then in your table click on the month column (MMM), then go to the menu and select 'Sort by Column' and in the drop-down menu, select 'Monthnumber' column :
then Short name of the month is sorted based on the number of month
Hi,
If you have Month as a number in your column list, you could sort the particular column MMM based on the number month column.
Add the below code to create a new column in the table as a month number :
'Monthnumber = "Month",MONTH([Date table])'
then in your table click on the month column (MMM), then go to the menu and select 'Sort by Column' and in the drop-down menu, select 'Monthnumber' column :
then Short name of the month is sorted based on the number of month
Hi @NewbieYR ,
A text column can be custom sorted by another column
To create a month sort column in DAX, you may use MONTH(Table[Date]).
In Power Query, go to Add Columns tab, highlight the dates column, go to Date then Month. This will create a column of month number where January is 1 and December is 12.
More info on custom column sort - https://radacad.com/sort-a-column-with-a-custom-order-in-power-bi
Proud to be a Super User!
User | Count |
---|---|
106 | |
90 | |
82 | |
76 | |
73 |
User | Count |
---|---|
112 | |
103 | |
96 | |
74 | |
67 |