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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Arrange date in correct order

Hi everyone,

 

I plotted a graph but the date structure is not arranged graphically. I got this column of dates from my excel file and It is in format Jan-16 which means January, 2016. I want to display the months in correct order and year but It is puzzled and I am not able to see the correct variation.

WRONG DATE.PNGSo this is the representation in front of me. How Can I sort it.

 

Thank you

 

Regards,

Diksha

1 ACCEPTED SOLUTION
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please create a custom column in power query:

 

= Table.AddColumn(#"Changed Type", "Datefororder", each Text.Insert([No. of Working Days],4,"20"))

 

Then convert it to date in data view:

Capture9.PNG

 

Then you can use sort by columns:

Capture10.PNG

 

Please refer to the pbix file.

 

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

 

Best Regards,

Dedmon Dai

 

 

View solution in original post

12 REPLIES 12
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please create a custom column in power query:

 

= Table.AddColumn(#"Changed Type", "Datefororder", each Text.Insert([No. of Working Days],4,"20"))

 

Then convert it to date in data view:

Capture9.PNG

 

Then you can use sort by columns:

Capture10.PNG

 

Please refer to the pbix file.

 

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

 

Best Regards,

Dedmon Dai

 

 

jaideepnema
Solution Sage
Solution Sage

Hi @Anonymous ,

Can you please confirm if the data type of your date column is date or something else ?

jaideepnema_0-1622650523663.png

 

Regards,

Jaideep Nema

h_l
Post Patron
Post Patron

@Anonymous a quick check , have you already tried the sort option on the visual ?

h_l_0-1622645855300.png

 

Anonymous
Not applicable

Hi,

Yes, I already tried it but It is not working.

 

Regards

So, in the table of PBI, the "Date" column (you got from excel) has been marked as Data Type "Date"?

If so, you may have to create another table for sort... as other replies introduced.

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

I suggest having one more column in your dim-date table for the purpose of sorting.

For instance, you can create endofmonth column by using the date column and the EOMONTH function.

Then you can sort the month-year column by the newly created column. 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Anonymous
Not applicable

Thank you for replying Jihwan.

I tried it but what to do in ENDOFMONTH Function?

I'm not getting option to write the column name in it?

 

Could you explain in detail. Header name for date column in format Jan-16 is No. of working days.

 

Thank you

Hi, @Anonymous 

Thank you for your feedback. 

If it is OK with you, please share your sample pbix file's link here, then I can try to look into it to come up with a more relevant solution.

Thanks.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Anonymous
Not applicable

Yes Sure..I've made a sample file your reference and the link is attached below. 

https://drive.google.com/file/d/1kZyc4NsV0fmrLhTEt_c06MQFdQx53y5r/view?usp=sharing 

 

Regards,

Diksha Gupta

Hi @Anonymous ,

 

after downloading the PBI file you shared, I didn't find the column is "Date".

Here is what after changing the column type:

h_l_0-1622661345413.png

 

h_l_1-1622661354070.png

 

Is this what you are expecting?

H

Nathaniel_C
Super User
Super User

Hi @Anonymous You ,will have to use the Sort by Column in the Data view.

Nathaniel_C_0-1622642552163.png

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-sort-by-column

 


Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Thank you for helping but It is not working. 

 

Best Regards,

Diksha Gupta

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.