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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

two different visuals with the same chart-axis range

Has anyone been successful with having the same chart-axis range with two different visuals?

 

For example, I have two line charts where the y-axis range changes dynamically for two data sets. I would like the y-axis range to be established by the data that requires the larger range and then apply that range to both visuals.

9 REPLIES 9
WillBr
New Member

I have a solution but requires a little work. 

 

Using a measure you will need to find the Max value from each of the charts then the max value from the 2. Now set the max range to this measure. 

 

 

Max Rounded Value =
VAR MaxA =
    MAXX(
        SUMMARIZE(
            'Table A',
            'Date table'[Date].[Month],
            "Total A", SUM('Table A'[Value A])
        ),
        [Total A]
    )
VAR MaxB =
    MAXX(
        SUMMARIZE(
            'Table B',
            'Date table'[Date].[Month],
            "Total B", SUM('Table B'[Value B])
        ),
        [Total B]
    )

VAR MaxValue = MAX(MaxA , MaxB )

VAR RoundedResult =
    SWITCH(
        TRUE(),
        MaxValue <= 100, CEILING(MaxValue, 10),
        MaxValue<= 1000, CEILING(MaxValue, 100),
        MaxValue<= 10000, CEILING(MaxValue, 1000),
        CEILING(MaxValue, 10000)
    )
RETURN RoundedResult

To expand on this, just wanted to bring attention to the F(x) button for a range maximum, which is where you can associate your chart max with a measure.  By the way, in my measure, I multipled my result by 1.16 so that the max line actually showed up (it truncates it for some reason).

 

K_cherry_0-1747250706970.png

 

Ady_Stone
New Member

Hi I wonder if anyone has an idea on how this can be achieved as there has been no solution to this.

I am sure that many have run into the same issue and mine is exactly the same. I need two charts side by side and for them to dynamically scale the Y axis to the maximum value plotted  

ChristaA
Microsoft Employee
Microsoft Employee

Following up in case you haven't yet found your answer. In trying to do the same thing, I ended up using small multiples, then editing the visualization setttings to accomodate the numner of related charts I had. This seems to work as desired.

v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Do you mean to achieve the below results?

001.png

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

I should have posted an image from the start.

 

I have two visuals with different ranges of y-axis. When finished, I still want two visuals but with the same ranges of y-axes.

 

example.jpg

Anonymous
Not applicable

It is easy to change the ranges manually to match. I need the ranges to change dynamically together as I select other sliders and filters.

amitchandak
Super User
Super User

You might have to find a custom one. There is an idea for this, Please vore for that

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/7135315-multiple-y-axis-on-a-char...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

I actually want 2 different charts with the same axes. Not a single chart with multiple axes.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors