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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
DAX_merchant
Helper II
Helper II

Conditional increase of granularity on an axis

Dear DAX community, 

 

I would like to have a visual that has conditional hiearchy in one of the x axes. The example I give is a line graph, showing sales for 4 calendar years of data, with the last year broken down into quarters. Is such a visualization possible without hard coding a column that contains those exact values?

 

The solution I have right now is that I can write a calculated column in my date table that will show calendar year for all years that are not the latest, then break down by quarter for the latest. The problem with this is that in an axis, the spacing between the quarters will be equal to the spacing between years, which can be misleading. Sketch of what I want is shown below. 

 

DAX_merchant_0-1713819572771.jpeg

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from @lbendlin , please allow me to provide another insight:

 

Hi @DAX_merchant ,

 

Create a quarter column and add it to the x-axis. Refer to the following:

qur_ =
IF (
    YEAR ( Table_[Date] ) < 2023,
    BLANK (),
    SWITCH ( QUARTER ( Table_[Date] ), 1, "Q1", 2, "Q2", 3, "Q3", 4, "Q4" )
)

vkongfanfmsft_0-1713841445788.png

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Thanks for the reply from @lbendlin , please allow me to provide another insight:

 

Hi @DAX_merchant ,

 

Create a quarter column and add it to the x-axis. Refer to the following:

qur_ =
IF (
    YEAR ( Table_[Date] ) < 2023,
    BLANK (),
    SWITCH ( QUARTER ( Table_[Date] ), 1, "Q1", 2, "Q2", 3, "Q3", 4, "Q4" )
)

vkongfanfmsft_0-1713841445788.png

 

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

This will work. It maintains the hierarchical look which is nice. Still, the expansion does not maintain relative tick size in relation to actual time, but that seems to be impossible. 

lbendlin
Super User
Super User

Why not use the standard axis hierarchy, with expand and collapse?

I have tried, but not found a way to expand only one year, and have that persist throughout the opening of the report once it is published. This seems leverage drill down which to my understanding can only do one of two things: expand all, or expand one and stop showing the others. If there is a way to expand one year while keeping the others as years, that would be nice. 

If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com/?forum=2d80fd4a-16cb-4189-896b-e0dac5e08b41

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors