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.
Hii,
Here is my Month-Year column,
Currently, It is sorted by alphabetic order of month but I want by ascending order of year. For e.g,
September2020, October2020, November2020, March2021, May2021 like this.
Please suggest me any idea on this. Thanks in advance!!!
Solved! Go to Solution.
Change the date format to whole number will better you sort the Month – Year .
(1)Make sure the Month-Year column is in Date format . If not ,change it to Date format .
(2)Create a column to return the whole number format for the Month-Year column .
Year-Month = YEAR('Table'[Date])*100+'Table'[Date].[MonthNo]
(3)Create a column to return the Text format for the Month-Year column .
month year = FORMAT('Table'[Date],"MMMM") & YEAR('Table'[Date])
(4)Select the visual ,and Sort by Year-Month , then choose Sort ascending .
The final result is as shown :
I have attached my pbix file , you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks!
Also consider using a "No Sort" Date table like shown here. M and DAX code provided.
No Sort Date Tables! – Hoosier BI
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Change the date format to whole number will better you sort the Month – Year .
(1)Make sure the Month-Year column is in Date format . If not ,change it to Date format .
(2)Create a column to return the whole number format for the Month-Year column .
Year-Month = YEAR('Table'[Date])*100+'Table'[Date].[MonthNo]
(3)Create a column to return the Text format for the Month-Year column .
month year = FORMAT('Table'[Date],"MMMM") & YEAR('Table'[Date])
(4)Select the visual ,and Sort by Year-Month , then choose Sort ascending .
The final result is as shown :
I have attached my pbix file , you can refer to it .
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks!
@Samruddhi_11 , Create a column like this in table and mark that as sort column
Month Year sort = FORMAT([Date],"yyyymm")
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
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 | |
96 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |