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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
PaulSGodden
Advocate I
Advocate I

Sorting data using another field

Have created a concatenate field using Project Name and Date Logged fields e.g. Desktop Refresh (01/07/2021), etc. and am displaying it in a Stacked bar chart. I want to order it using the Date Logged field.

Have gone into the Data view and tired to sort it using the above field however I get:

 

We can't sort the Concatenate1" column by "DateLogged". There can't be more than one value in the "DateLogged" for the same value in "Concatenate1". Please choose a different column for sorting the data in "Date Logged"

2 ACCEPTED SOLUTIONS

Hey @PaulSGodden ,

 

yes, as the error says: There can't be more than one value in the "DateLogged" for the same value in "Concatenate1".

 

Fix that and it will work.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

Found the issue and have now resolved it. Thanks for your help on this.

View solution in original post

5 REPLIES 5
selimovd
Super User
Super User

Hey @PaulSGodden ,

 

when you use a sort by column each sort by field has to be unique for each value.

For example when you would sort month name by month number, how should Power BI sort if there is a row that says January is month number 1 and another row says January is month number 3.

 

So you have to make sure the sort by column always returns the same value, for example for January it must return always 1. Check that in your data model and it should work.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Thanks @selimovd for the response.

 

Understand (I think) what you've said but I am trying to sort [Project Name]-[(Date Logged)] with the [Date Logged] field. *- Checked the Data model and the format for this is dd/mm/yyyyy so I can't see how that could ever return a different answer. There may be occassions where 2 different projects get logged on the same day. Is that where the problem is?

Hey @PaulSGodden ,

 

yes, as the error says: There can't be more than one value in the "DateLogged" for the same value in "Concatenate1".

 

Fix that and it will work.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Found the issue and have now resolved it. Thanks for your help on this.

Hey @PaulSGodden ,

 

I'm happy you could solve that 😊

Could you please also mark the post as solution ✔️ that helped you to make it work?
You can mark multiple posts as solution and like this, the next person who is stumbling across this post can see immediately what worked.
 
If you need any help please let me know.
 
Best regards
Denis
 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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