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

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

Reply
JimJim
Responsive Resident
Responsive Resident

Sort one column by another - messy data

Hi Guys,

 

I have a report: products.pbix and am trying to sort output by output_description output_description by output so that the sort order on my slicer is more user friendly, but the problem is the data is quite messy and I can't create the sort. Is there an alternative?

1 ACCEPTED SOLUTION

@JimJim 

This is the opposite of what you asked in the original question 🙂

And it's solvable. Here are the steps you need to take:

1. From PQ duplicate table :

Ritaf1983_0-1718097850697.png

2. Remove all the columns except 2 needed :

Ritaf1983_1-1718097925840.png

3. Remove duplicates from output description:

Ritaf1983_2-1718097987988.png

4. Filter out "null" (if you have)

Ritaf1983_3-1718098123099.png

5. Close and apply

Ritaf1983_4-1718098166588.png

6. create a relationship between the sort table and the main table

Ritaf1983_5-1718098225906.png

7. In the sorting table apply a wanted sorting logic :

Ritaf1983_6-1718098268693.png

8. Use the sorting table as a slicer, it will filter the main table due to their relationship :

Ritaf1983_8-1718098432660.png

The pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

7 REPLIES 7
JimJim
Responsive Resident
Responsive Resident

Hi @Ritaf1983 , apologies for not being clear. When I attempt to sort column output_description by output, I get an error message:

 

"We can't sort the output_description column by output. There can't be more than one value in output for the same value in output_description"

Hi @JimJim 

Technically, you've explained yourself perfectly. The error message is clear and well-known.

However, to better assist you, we need to understand the logic behind what you're trying to achieve.

Based on the data in the table, as I explained in my previous response, there's no reason to sort these columns one by another since the order is already identical.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
JimJim
Responsive Resident
Responsive Resident

@Ritaf1983 , I would like the order of values in my slicer to sort by the output (numerical value) and not by the output_description (text value). Here is an image of my current problem, as you can see, 13 comes after 1290

 

JimJim_0-1718096716592.png

 

@JimJim 

This is the opposite of what you asked in the original question 🙂

And it's solvable. Here are the steps you need to take:

1. From PQ duplicate table :

Ritaf1983_0-1718097850697.png

2. Remove all the columns except 2 needed :

Ritaf1983_1-1718097925840.png

3. Remove duplicates from output description:

Ritaf1983_2-1718097987988.png

4. Filter out "null" (if you have)

Ritaf1983_3-1718098123099.png

5. Close and apply

Ritaf1983_4-1718098166588.png

6. create a relationship between the sort table and the main table

Ritaf1983_5-1718098225906.png

7. In the sorting table apply a wanted sorting logic :

Ritaf1983_6-1718098268693.png

8. Use the sorting table as a slicer, it will filter the main table due to their relationship :

Ritaf1983_8-1718098432660.png

The pbix is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

 

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
JimJim
Responsive Resident
Responsive Resident

@Ritaf1983 , thank you so much, I did indeed mess up my original post and have edited it to prevent others from being confused. I really appreciate your help.

 I'm always happy to help, and of course, my comments are not meant to be condescending or prove you wrong. Rather, I'm trying to clarify what is needed so I can better assist you 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Hi @JimJim 

Based on the information in your file, the order of output and output_description is identical since one is derived from the other.

The output_description appears to be a simple concatenation of output with units_measure.

Therefore, it's difficult to understand your intended meaning. Could you please provide an example of the desired outcome?

Ritaf1983_0-1718088767977.png

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.