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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
MarkNoordraven
Frequent Visitor

How to get a MMM-formatted X-axis with week-level data granularity, without aggregating to month?

Hi all,

 

I've got a table with 2 columns, values and weekly dates. Plotting it into a line chart and removing the date hierarchy results in the following chart:

Picture current state.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

What I'd like to do is change the X-axis format to "MMM" instead of the current "Mmm YYYY", while retaining the weekly tooltips as in current example and while retaining the weekly character of the line.

 

Things I tried:

  • Creating a custom date hierarchy of year-month-week-day.
  • Creating a separate date DAX-based calendar table with week numbers and dates formatted in "MMM".
  • Creating a separate Power Query based calendar table with week numbers and dates formatted in "MMM".

Challenges I run into:

  • These solutions result in a monthly line in which the monthly data points are an average of the underlying weekly data points.
  • The X-axis formatted as "MMM" is sorted alphabetically.
4 REPLIES 4
v-yuta-msft
Community Support
Community Support

Hi MarkNoordraven,

 

Click format-> X axis and change continuous to categorical type.

11.PNG 

 

Regards,

Jimmy Tao

Hi Jimmy,

 

Thank you for your response.

 

The proposed solution doesn't appear to work for me unfortunately, because of these reasons:

- The line turns into a monthly line in which each point on the chart is an average of the underlying weeks in the month.

- The months are sorted in an inappropriate order.

Picture current state2.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

rechterkant.JPGrechterkant categoricalk.JPG

 

 

When I try to change the order in the Modeling tab, I get the following error:

Can't sort by other column.JPG

 

 

Hi MarkNoordraven,

 

Change "Average of Value" to "Sum of Value" in the value field. 

11.PNG 

 

In addtion, the sort of date is decided by first alphanumeric when the value is text type, so you should change text type to date type.

 

Regards,

Jimmy Tao

Thank you Jimmy for looking into my question.

 

  • It appears formatting into date results in an error.

cant convert to date.JPG

 

  • Summing Value seems to result in the months in the axis shifting around, but not yet following chronological order.

axis months change.JPG

 

If it helps, please find below the .pbix file used in these examples: https://we.tl/t-VtukT8XB1x

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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