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
Cabbage_Baby
Frequent Visitor

Measure Not Working on Line Chart Y-Axis Maximum

Hi Power BI Experts, I could use some help with a DAX and visual interaction issue:

I'm trying to create a dynamic Y-axis maximum for a line chart that responds to different levels of date granularity. Here's the measure I created:


Cabbage_Baby_0-1745464469372.png

 

The intention is to return a different maximum value based on the current date level selected via bookmark navigation (week, month, or year).

Cabbage_Baby_1-1745464480282.png

When I use this measure in a matrix visual, it works perfectly—returning the expected values when switching between date levels using the bookmark navigator.

Cabbage_Baby_8-1745464208225.png

Cabbage_Baby_0-1745464411206.png

 

Cabbage_Baby_10-1745464221088.png

However, when I try to apply this same measure to the Y-axis Maximum range via Conditional Formatting on a line chart, it doesn’t respond at all. The value remains static, regardless of which date granularity is selected.

Cabbage_Baby_7-1745464097513.png

Cabbage_Baby_6-1745464078952.png

 

Is there any workaround to get this formula to work?


Below is the link to my power BI report :

https://drive.google.com/file/d/1PNr_YBySL6FxNSUZMji1lqB23oLzjJw4/view?usp=sharing


Appreciate any insights!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but one of ways to achieve this is to use field parameter feature.

 

Use report readers to change visuals (preview) - Power BI | Microsoft Learn

 

Please check the below picture and the attached pbix file whether it suits your requirement.

 

Jihwan_Kim_0-1745465699034.png

 

Y-Axis Max limit: = 
SWITCH ( SELECTEDVALUE ( prm_x_axis[title_sort] ), 
0, 10, 
1, 20, 
2, 30 
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Cabbage_Baby
Frequent Visitor

OMG thanks @Jihwan_Kim , it workkkksssss. 

Thank you so so much!

 

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but one of ways to achieve this is to use field parameter feature.

 

Use report readers to change visuals (preview) - Power BI | Microsoft Learn

 

Please check the below picture and the attached pbix file whether it suits your requirement.

 

Jihwan_Kim_0-1745465699034.png

 

Y-Axis Max limit: = 
SWITCH ( SELECTEDVALUE ( prm_x_axis[title_sort] ), 
0, 10, 
1, 20, 
2, 30 
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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.