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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ElliotG
Frequent Visitor

How to Have X-Axis Range Match A Different Bar Chart X-Axis

Hi Everyone,

I'm working a report where I want to do the following:

  • I have 1 bar chart (A) that is static (shows top 10 results)
  • I have 1 bar chart (B) that is dynamic based on page slicers
    • I want this bar (B) charts X-Axis range to always be the same as the first static bar chart (A)

How can I accomplish this?  I thought I could use conditional formatting on bar chart (B) (properties x-axis range) that says the max is using a measure (MAX(BarChartA))

ElliotG_0-1705682120883.png

Any help would be awesome, thanks!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ElliotG ,
To match the X-axis range to the different bar chart X-axis, as you said, we can use use conditional formatting on bar chart (B). Here are some steps:
1.Create two charts and a slicer which based on Distribution column
2.Select slicer and go to Format -> Edit interaction

vheqmsft_1-1705906382778.png

3.Close Chart A's interaction with slicer

vheqmsft_2-1705906485670.png

4.Create a measure

Max_Value = MAXX(ALL('Table'),'Table'[Value])

5.Select chart B and go to Visualiztion ->Format -> X-axis -> Maximum and apply meaure

vheqmsft_4-1705906976970.png

6.Final output

vheqmsft_5-1705907032984.png

 

Best regards

Albert He

 

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

4 REPLIES 4
Anonymous
Not applicable

Hi @ElliotG ,
To match the X-axis range to the different bar chart X-axis, as you said, we can use use conditional formatting on bar chart (B). Here are some steps:
1.Create two charts and a slicer which based on Distribution column
2.Select slicer and go to Format -> Edit interaction

vheqmsft_1-1705906382778.png

3.Close Chart A's interaction with slicer

vheqmsft_2-1705906485670.png

4.Create a measure

Max_Value = MAXX(ALL('Table'),'Table'[Value])

5.Select chart B and go to Visualiztion ->Format -> X-axis -> Maximum and apply meaure

vheqmsft_4-1705906976970.png

6.Final output

vheqmsft_5-1705907032984.png

 

Best regards

Albert He

 

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

 

Do you know a way to have the label on the left side of the graph between the 2 graphs always have the same length? 

For example, with image A, I have selected a value of A.  When I change the slicer on the page, in Image B, the bottom graph doesn't change (as it's not impacted by the slicer interaction), but the top graph does change and then the two graphs don't align.  It would be great if they both aligned on the X-Axis no matter what the slicer selected!

Image A

ElliotG_0-1706223412660.png

Image B

ElliotG_1-1706223580756.png

 

PijushRoy
Super User
Super User

Hi @ElliotG 

As you say, create a measure for MAX value and apply in X-Axis Maximum function

PijushRoy_0-1705686606581.png

 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





I tried that but it doesn't change the visual.

Here is what I tried
Measure = CALCULATE(SUM([Incentives]), [Rank] = 1)

I added this to the X-Axis Maximum function in graph B and nothing changed.  

I would hope this would be the same as the max / top most value in the bottom graph but nothing shifted or changed.  Am I missing something?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.