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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
user_dil
Frequent Visitor

Customised Dates

Hi All,

 

I'm trying to create a simple line chart with a customized date format using as the X-axis. 

Date type: Dec 1- Th, Dec 2-Fr, ....., Jan 31-Tu, Feb 1-We, Feb 2-Th likewise up to current date.

 

I was able to create the date format by merging the relevant columns. But the issue I'm facing is how to sort them correctly.

 

Hope someone can give me guidance on that.

Thanks!

 

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @user_dil 

you can get the column with one step, like:

Column = FORMAT([Date], "mmm-dd") &"-"& LEFT( FORMAT( [Date],"ddd"), 2)

 

to sort a visual, you can still pull the original [date] column to the tooltip of the visual and use the [Date] column to sort the axis. 

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

hi @user_dil 

you can get the column with one step, like:

Column = FORMAT([Date], "mmm-dd") &"-"& LEFT( FORMAT( [Date],"ddd"), 2)

 

to sort a visual, you can still pull the original [date] column to the tooltip of the visual and use the [Date] column to sort the axis. 

danextian
Super User
Super User

Hi @user_dil ,

 

Does the table that has this calculated column have an actual dates column? If so you can create a calculated column to sort the custom date format by

=( 'Table'[Date], "mmdd" )









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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @danextian 

I did as you said but not getting the sort as I want.

 

user_dil_0-1675400772689.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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