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
mmace1
Impactful Individual
Impactful Individual

Dates Grouped by Month/Year - some months not labled on axis

Capture.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

Hi - so my chart is missing some of the X-axis lables for month/year.

 

I could switch it from Continuous to Categorical, but then things are out of order. Capture2.PNG

 

My "Month & Year" field is from my Calender table, and is calcualted via:

 

date(year('Calender Table'[Date]),month('Calender Table'[Date]),1)

 

If it makes a difference.

 

Seems like a pretty simple thing, but what am I missing?  Thanks!

 

1 ACCEPTED SOLUTION

Perfect. You'll need to use the "categorical" sort to get all labels. Then to get them in the correct order:

  1. select the data field (MMYYYY) from under the fields pane on the far right
  2. Under the modeling tab in the ribbon, sort by a YYYYMM formatted column from your datekey
    YMonth = format(DateKey[Date],"YYYYMM")
    2018-03-06_15-25-18.gif

View solution in original post

5 REPLIES 5
nchambe
Advocate II
Advocate II

Create a DateKey and then make sure you sort your "Month" values by month number as described in this post. That will make sure your months show up in the correct order in visuals.

 

I would also recommend using the values from the DateKey on the axis (and in any filters) instead of the values from your data. It allows for consistent, continuous dates even when you don't have data for a date. Just be sure to create a relationship between your data's date field and the date field in the DateKey so that it works.

mmace1
Impactful Individual
Impactful Individual

Thanks, but this is already all coming from a Calender table (aka DateKey). 

Perfect. You'll need to use the "categorical" sort to get all labels. Then to get them in the correct order:

  1. select the data field (MMYYYY) from under the fields pane on the far right
  2. Under the modeling tab in the ribbon, sort by a YYYYMM formatted column from your datekey
    YMonth = format(DateKey[Date],"YYYYMM")
    2018-03-06_15-25-18.gif
mmace1
Impactful Individual
Impactful Individual

Thanks - the 'Sort by Column' is what I was missing.  Though, mine is greyed out for some reason...

 

I tried changing my month/year to the way yours is calculated (using format, whereas I was using date), but that doesn't seem to make a difference.

Hi @mmace1,

 

Make sure you have selected the column which needs to be sorted like month name rather than just select the visual.

 

Also, in "Data" view mode, select the certain column, is "Sort by Column" available?

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.