Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Guys,
sample values:
YEAR MONTH
2021 JAN
First, in order to drill down, I transformed this to 'DD-MMM-YY'. I have no trouble sorting the months - they begin in January and end in December.
I'd like to reduce the Months to three characters alone. I followed some of the procedures mentioned here, such as adding a new column to convert the month to three characters and another column to set the counter part number before sorting the columns, but why isn't it working for me?
please see screen shots below
Current header
just ingnore the column name..i forgot to alter to month_num 🙂
Sort by Column
TIA
Solved! Go to Solution.
Hi @Reynan_s ,
I created some data:
Here are the steps you can follow:
Because the sorting rules of power bi are sorted in alphabetical order, A will appear in the first.
1. Use Enter data to create a table.
2. Select column [3], click Column tools-Sort by column-Column [lndex].
3. Connect the relationship between the two tables.
4. Place column [3] of Table2 into the matrix.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Reynan_s ,
I created some data:
Here are the steps you can follow:
Because the sorting rules of power bi are sorted in alphabetical order, A will appear in the first.
1. Use Enter data to create a table.
2. Select column [3], click Column tools-Sort by column-Column [lndex].
3. Connect the relationship between the two tables.
4. Place column [3] of Table2 into the matrix.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I've tried to create a new table
Even after I sorted the the Month_no it's still not sorting 😞
@Reynan_s , I think you are marking that as date, keep it simple
Month sort = Month([Date])
Click on the month column, When that is selected. Click on sort column, Select Month Sort.
Add month to visual(Table/Matrix/Bar/Pie etc) , it should sort correctly.
It will not sort on data view using sort column
Sorry, still not working for 3 chars month
Done adding new columns
The Month2 is the FORMAT([Date],"mmm") but why the Month sort = FORMAT([Date],"mm") not converting to a whole number?
@amitchandak thanks for the reply and followed your reco
Still not sorting 😞
3_Month = UPPER(FORMAT('Table'[DateConv],"mmm"))
@Reynan_s , You need create columns like
Month = FORMAT([Date],"mmm")
Month sort = FORMAT([Date],"mm")
Mark Month Sort as the sort column of Month
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |