Reply
Member
Posts: 60
Registered: ‎11-12-2015

How To Have Custom Formatted Date with Date Data Type

When I create a calculated column as:

 

Month Abbreviation Day = Format('Date'[Calendar Date],"MMM dd")  it has a data type of Text.   If I change the data type to Date then I lose the formatting.

 

How can I make a true date column with the "MMM dd" format?

 

Thanks.

Super User
Posts: 2,146
Registered: ‎08-11-2015

Re: How To Have Custom Formatted Date with Date Data Type

[ Edited ]

Yes FORMAT converts value into text

 

I didn't see your requested MMM DD Format in the Modeling tab - the closest one I saw was MMMM D

but I suspect you don't want the whole month name.

 

Date Format.png

 

EDIT: What problem do you encounter when the values are converted into text?

Highlighted
Member
Posts: 60
Registered: ‎11-12-2015

Re: How To Have Custom Formatted Date with Date Data Type

Sean, 

 

Thanks for the response.

 

I need the labels to be as small as possible since I am trying to display a rolling 30-day X-Axis.   If I make them text, then the Continuous X-Axis doesn't work and the users want that since that is what they had it Excel.   Always an adventure trying go provide the same functionality.   It would be really nice if a custom format could be used instead of just the ones in the drop down.

Super User
Posts: 2,146
Registered: ‎08-11-2015

Re: How To Have Custom Formatted Date with Date Data Type

[ Edited ]

@dataguy

Have you tried selecting the Show Items with no data - when placing the Formatted as text column in the Axis

 

Show Items with no Data2.png

Member
Posts: 60
Registered: ‎11-12-2015

Re: How To Have Custom Formatted Date with Date Data Type

Great idea!   I gave it a try and the X-Axis displays correctly but I can't change the X-Axis from Categorical to Continuous.