Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I am trying to sort my data by Month, so that it appears in the correct month order in my various visuals.
There are multiple lines per month based on client data, each line with the corresponding Month and Period (month number).
I am getting the error "We can't sort the 'Month' column by 'Period'. There can't be more than one value in 'Period' for the same vlue in 'Month'. Please choose a different column for sorting or update the data in 'Period'."
I have tried adding a calculated column for month number and sorting that way. Same error.
I have tried adding a conditional column and feeding it every month name and month number and sorting that way. Same error.
I have double checked my data. Every line has the correct month name and correct corresponding month number.
Any other ideas?
Thanks~
@jsralat I cannot recreate this. See PBIX. The most obvious cause for this would be some type of mismatch between your two columns like a "January" and a 2 or, a "January " and a 1. Note the trailing whitespace in the second example. Perhaps try applying a clean and trim operation on your Month column as well as Period just to be sure.
I went back to my data and found two rows with (blank) for Month and Period. I assigned them a month and period just to test. I then also re-typed the months and corresponding month number in Period, ensuring they were consistent, just to make sure. Refreshed my data and I'm still getting the same error when I try to sort Month by any other column. I'm at a loss.
I have the same issue. I created custom size buckets column (B) for a numerical column (A). Then I created a custom sort column (C) using SWITCH() based on that custom buckets column (B). I get this error. Went through my entire data to ensure that one value of C corresponds to only one value of B. I still get this stupid error. This is beyond nonsensical. Sorting is such a breeze in tools like Tableau where you can even ctl+drag to sort them however you want. DAX is so painful in that it always makes you go the long way for even ridiculously simple things such as these!! 😫😡
User | Count |
---|---|
84 | |
80 | |
70 | |
47 | |
43 |
User | Count |
---|---|
108 | |
54 | |
50 | |
40 | |
40 |