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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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