Reply
markmess77
Resolver I
Resolver I
Partially syndicated - Outbound

Aggregate date by quarter with continuous x-axis

I have a date table in my model defined as 

GENERATE(
     CALENDARAUTO(),
     VAR BaseDate = [Date]
     RETURN ROW (
         "DateKey", FORMAT (BaseDate, "yyyymmdd"),
         "Year", YEAR(BaseDate),
         "MonthName", FORMAT(BaseDate, "mmm"),
         "MonthNumber", FORMAT(BaseDate, "m"),
         "Quarter", "Q" & FORMAT(BaseDate, "q")
)

I can easily create a continuous x-axis on a chart by using the Date field generated, but it is at a daily level. I have been able to create an aggregation to the quarter level by creating a hierarchy between the Year and Quarter fields, but it consquently creates a categorical axis. This then creates a scroll bar at the bottom of the chart so the user would have to scroll through to see the trend. 

What is the best way to make this a continuous axis so I can remove the scroll bar from the chart axis?

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Syndicated - Outbound

Hi @markmess77 ,

 

Continuous axis are available for numbers so if you change your quarter values to a date instead of a Q something you have the hability to have the continuous axis.

 

Create a column for the Quarter Date like:

Start OF Quarter = CALCULATE (
MIN ( 'calendar'[Date]),
ALLEXCEPT ( 'calendar', 'calendar'[Qtr], 'calendar'[year] )
)

Then use this column to plot your data, you can also use MAX instead of min and get the end of the quarter.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Syndicated - Outbound

Hi @markmess77 ,

 

Continuous axis are available for numbers so if you change your quarter values to a date instead of a Q something you have the hability to have the continuous axis.

 

Create a column for the Quarter Date like:

Start OF Quarter = CALCULATE (
MIN ( 'calendar'[Date]),
ALLEXCEPT ( 'calendar', 'calendar'[Qtr], 'calendar'[year] )
)

Then use this column to plot your data, you can also use MAX instead of min and get the end of the quarter.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



avatar user

Helpful resources

Announcements
March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)