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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
miken72
Frequent Visitor

Setting the Y axis of a stacked column or bar chart to show the max value

Hello,

I have a report with a stacked column bar chart where I want the Y axis of the column chart to show 0-32, with 32 showing as the maximum value on the chart's Y axis. It sounds easy - it probably is, but I can't work out how to do it!

The chart takes up most of the page.

I have set the max value of the range to 32 in the chart's axis settings but the chart shows 30 as the max value, not 32.

I am probably missing some simple solution. I have tried a few different things after searching the Web, but no luck so far. 

Thanks in advanceSkärmbild 2025-12-09 094223.png
 

1 ACCEPTED SOLUTION

The axis increments are automatically generated, so your custom maximum won’t appear unless it matches that pattern. I would suggest adding a constant line instead to indicate the maximum value.

danextian_0-1765278942824.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

9 REPLIES 9
v-nmadadi-msft
Community Support
Community Support

Hi @miken72 

May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


Thank you

v-nmadadi-msft
Community Support
Community Support

Hi @miken72 ,


Just to clarify, creating a measure and adding it to the tooltip will not force the Y-axis to extend to 32. It may increase the visual’s data range internally, but it will not adjust the displayed axis scale. As a workaround, the most reliable method is to use an X-axis constant line to highlight the 32 mark visually as suggested by @danextian 

 

May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


Thank you

Nabha-Ahmed
Super User
Super User

Hi @miken72 

Add an invisible measure to force the scale

1. Create a measure:

ForceMax = 32


2. Add this measure to the chart’s Secondary Values (not tooltip).

If you don’t see “Secondary values,” turn on “Show secondary” in the visual settings.

 

3. Format the ForceMax series:

Set Data color = 100% transparent

Disable labels

Disable legend entry

 


This forces the Y axis to scale to 32 because now the chart contains a value of 32 (even if it’s invisible).


---

🔄 If the visual does not support Secondary Values (older version or specific chart type)

Use this alternative trick:

1. Create a calculated table with one row:

AxisMax = DATATABLE("Value", INTEGER, { {32} })


2. Relate it to nothing (it’s a disconnected table).


3. Add the field Value from AxisMax to the visual’s Column Y-axis (as an additional hidden series).


4. Make it fully transparent.

 

This works in all versions and all chart types.


---

⚠️ Version note

Your version (May 2025) still requires one of the above tricks — the built-in “manual max axis” does not override auto-scaling in stacked charts unless a real data point matches the max.

 

Hello Nabha-Ahmed,

 

Thanks for your reply. 

I tried both methods -
With the first one , do you mean that I need to change the diagram type from a stacked column chart to a line and stacked column chart?

I did so.
Now, in the visual settings för the chart I see "Secondary Y axis". I added the ForceMax measure (ForceMax = 32) to the chart's Line Y axis and made it transparent, and hid the datalabels etc, but unfortunately neither the Y axis not the secondary Y axis have changed from showing 30 as the maximum to showing 32 - as I need it to.
Skärmbild 2025-12-10 115728.png

I tried the second suggestion with the calculated table (see the pic - I changed the value columns to black just to show them), but here also, the maximum value shown on the Y axis doesn't change from 30 to 32.
Skärmbild 2025-12-10 115826.png
Maybe I have missed something or have done something wrong.

Thanks again.



 

danextian
Super User
Super User

Hi @miken72

Changing the Y-axis maximum adjusts the height but not the step increments. Your X-axis uses increments of 5 starting at 0. The value updates when set to 35 because it matches the increment pattern, but not when set to 32.

Please note though that the pattern changes depending on the column values and the max value itself so use this if you expect the actual max value to be always the same.

danextian_0-1765274823821.gif

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thanks for your reply, Danextian,

I want the Y axis to show 32 as the max value regardless of if the filtered data is under 32 or not.
Some of my data does go to 32 but even then the Y axis shows 30 as the maximum value (and the columns go a little above it).

Is this possible?

Thanks again.

The axis increments are automatically generated, so your custom maximum won’t appear unless it matches that pattern. I would suggest adding a constant line instead to indicate the maximum value.

danextian_0-1765278942824.png

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
rohit1991
Super User
Super User

Hii @miken72 

 

You’re not missing anything Power BI simply ignores manual max unless the data contains that max somewhere. Add a dummy measure (ForceMax = 32) to the tooltip, and the axis will display 0–32 correctly.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

Hello rohit1991

Thanks for your reply. I must be doing something wrong-

I created a measure ForceMax = 32

I added it to the tooltip in the Stacked Column Chart

The Y axis still shows 30 as the maximum value...

I must have missunderstood your comment.

Could it be that I am using a slightly older version of Power BI Desktop (version: 2.143.1204.0 64-bit (May 2025))?
Skärmbild 2025-12-09 111039.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.