Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jsralat
New Member

Sort by column getting "same value" error

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).

jsralat_0-1714411405536.png

 

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~

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@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.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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!! 😫😡

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors