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 have a table with some null data, and am plotting it by year/month. Even though the X axis is sorted by year / month (so 201801, 201802, etc), all the months/years with no data are coming first, even though they're later than the months/years with data. Pic attached.
Solved! Go to Solution.
Hi, @ipelly
According to your description, I can understand clearly what you want to get, I think you can achieve this using another calculate column to sort the [Year month] column, you can try my steps:
Yearmonth = YEAR([Date])&FORMAT([Date],"mm")Sort column = YEAR([Date])&FORMAT([Date],"mm")
Then change them to different data type, one “Whole number” and one “Text”, like this:
And you can get what you want
You can download my test pbix file here
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @ipelly
According to your description, I can understand clearly what you want to get, I think you can achieve this using another calculate column to sort the [Year month] column, you can try my steps:
Yearmonth = YEAR([Date])&FORMAT([Date],"mm")Sort column = YEAR([Date])&FORMAT([Date],"mm")
Then change them to different data type, one “Whole number” and one “Text”, like this:
And you can get what you want
You can download my test pbix file here
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 38 | |
| 31 | |
| 30 |