Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! 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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.