Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
|
I am getting an error in sorting by another column on a very simple case:
I have a Month Year (text) column, and a Year Month (number) column, and when I try to sort the former by the letter, I get the error message about not being allowed to have multiple values in the sort column for a value in the forth column.
The Year Month number is just year * 100 + month.
There was a blank row that I filtered out, but otherwise the data is "clean". There are multiple rows with the same data in these columns.
Here is a sample of the (summary) data. Any suggestions would be appreciated.
Solved! Go to Solution.
@Walt1010 , With Data I can see you should not face the issue
So if your Data is in MMMM YYYY or MMM YYYY format and sort it on YYYYMM format it should work
Try creating the column again like
Month Year = FORMAT([Date],"mmmm yyyy")
Month Year sort = FORMAT([Date],"yyyymm")
or
Month Year sort = year([Date]) *100 + month([Date])
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
Using DAX to create the columns as you suggested, worked! I had previously created them using M. I'm not sure why there was a difference, but I'm glad I got over the problem. Thank you!
@Walt1010 , With Data I can see you should not face the issue
So if your Data is in MMMM YYYY or MMM YYYY format and sort it on YYYYMM format it should work
Try creating the column again like
Month Year = FORMAT([Date],"mmmm yyyy")
Month Year sort = FORMAT([Date],"yyyymm")
or
Month Year sort = year([Date]) *100 + month([Date])
How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
82 | |
67 | |
61 | |
46 | |
45 |