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
Anonymous
Not applicable

Convert existing date field in my table to display month-year (mm-yyyy) and sort by year, then month

 

Below is a picture of the X Axis in my report .. 

 

Column name is "Completion_Date" and I want to convert the display to show by Month plus Year (06-2022) then sort the same in my chart.  However, I cannot create a measure to find my date column .. it keeps showing me other calculated columns, not the data columns in my table.  Also, need to know the syntax and how to sort ... thank you!  I did create a date table that I related to my date column in my table, but cannot get the display to work ...

PettyRoses_0-1656462157786.png

 

4 REPLIES 4
Anonymous
Not applicable

Actually I just looked at the data type of my "date" column and it looks like it is a "Text" column ... is there anyway of formatting a text date column as a month year?

Anonymous
Not applicable

Thank you for responding.  When I create the new measure using the syntax above, I do not see my date column listed .. it only shows other measures .. no regular columns are available .. what am i doing wrong?

Hi @Anonymous 

You can use the code I posted below in a calculated column instead of a measure.

Seanan
Solution Supplier
Solution Supplier

Hi @Anonymous 

You can format your date column into month and year using the following code in a calculated column:

FormatDate = FORMAT('Values'[Dates],"MM-YYYY")

You can then sort your chart by clicking on the 3 dots in the top right corner, sorting by date, descending

NVIDIA_Share_BC6w2gs0J1.png

 

 

 

 

 

 

Kind regards,
Seanan
If this post helped, please consider accepting it as the solution.

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.