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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
rosscortb
Post Patron
Post Patron

Help sorting column order

Hello,

 

Hoping you can help, might not have done this correctly but here's where I am. I  have two date columns, start and end. Shown as i.e 01 Feburary 2015.

In then needed to change the format  so created two new columns with the measure of 

Start Date Year Mon = FORMAT('Job Positions'[Start_Date],"MM/YYYY")
End Date Year Mon = FORMAT('Job Positions'[End_Date],"MM/YYYY")
 
so now shows as 02/2015
Now, I needed to create another column to join these together so I have
 
Start Date and End Date = CONCATENATE('Job Positions'[Start Date Year Mon],CONCATENATE(" ~ ",'Job Positions'[End Date Year Mon]))
 
so shows something like 02/2015 ~ 03/2016
 
Problem is how to do a Sort by Column so that the Current Job Position is at the tob and previous job below and so on, in a table. Is it because its a text field I can't do it?
sortbucolumn.PNG
1 ACCEPTED SOLUTION
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @rosscortb 

It could not work when you sort the same value[Start Date and End Date] by different values[Start Date].You may use sort by 'Start Date Mon' as below green part.

a1.png
Regards,
Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-cherch-msft
Microsoft Employee
Microsoft Employee

Hi @rosscortb 

It could not work when you sort the same value[Start Date and End Date] by different values[Start Date].You may use sort by 'Start Date Mon' as below green part.

a1.png
Regards,
Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for your help @v-cherch-msft , wasn't aware that you could join the columns that way. Thanks again.

jthomson
Solution Sage
Solution Sage

Really don't get what you're asking exactly - you go on about concatenating a couple of columns together then go off on a complete tangent, can you clarify what you're actually wanting?

HotChilli
Community Champion
Community Champion

When you say 'Sort by Column' hopefully you know about https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column#sort-using-the-sort-by-column-butto...

 

and you could use the job positions[start date]

Yeah, wouldn't let me use Start Date.

 

sort1.PNG

Ah, fine.  Error messages are usually helpful.

The message says it doesn't know how to sort because start date is not unique 'enough', that is, the same start date exists for different 'start and end date' values.

So you need to find a way of making it unique, maybe add a calculated column (number) to sort by, constructed from the 'start and end date' field like yyyymmdd from start date and append yyyymm  from end date.  Just an idea, i haven't tested it.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.