Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I was working on a pbi report where data source is Cube. When i create a chart and sort by month and year column(Data format is string) it not coming correctly (As attached). can we create a meaure on PBI for sorting this
Solved! Go to Solution.
I have a column which gives me the month number and then i create another column and use the below to sort the month & year
Proud to be a Super User!
@Anonymous , Only two M
FORMAT(FactPortfolio[DateKey],"YYYYmm")
And made this sort column no need to use in visual. In visual you can use your old column
refer
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
I have a column which gives me the month number and then i create another column and use the below to sort the month & year
Proud to be a Super User!
@Anonymous , No you need column. Please check if creation on the column is allowed
If you have month year in the format
Month Year = FORMAT([Date],"mmm-yyyy")
you need a sort column like this
Month Year sort = FORMAT([Date],"yyyymm")
follow steps
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
I tried to chnages the format but still it not resolved.
FORMAT(FactPortfolio[DateKey],YYYYmmm)
Let me know if you try my method @Anonymous
Proud to be a Super User!
I tried this way aswell, Same result. Thanks A lot . Really helped me
@Anonymous Happy to help.
Proud to be a Super User!
@Anonymous , Only two M
FORMAT(FactPortfolio[DateKey],"YYYYmm")
And made this sort column no need to use in visual. In visual you can use your old column
refer
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 39 | |
| 37 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 119 | |
| 100 | |
| 72 | |
| 69 | |
| 65 |