Dynamic x axis break based on values

NickvdB

Board Regular
Joined
Apr 30, 2014
Messages
94
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a waterfall graph in which I can select a team. Some teams have large budget and some have smaller budgets. Is there a possibility (preferably not vba) to have the x axis automatically break at a certain point? For instance 80% of budget amount? So y axis would start at 80K for a team with a budget

Thanks
 
Wow, luv the bar chart thinking!!! Looks great and seems perfect. Well have a look tomorrow. Thanks!!!
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Yes getting there!!
Strange thing remaining is the mismatches on the amounts for the deviations. In the chart Indexation is -20 while you can see it should be +10

1723186196246.png
 
Upvote 0
Here is a working file for you to download:

Waterfall chart with Dynamica Y axis.zip

Waterfall chart with Dynamica Y axis.xlsx
ABCDEFGHIJKLMNOPQ
1Team 1Team 2Selected teamSelected data (data label) 90% of minTotals - 90% of minClosing valueOpening valuemaxminPos difNeg difLabel helper column
2Annualized 20241450000725000Team 11,4501,260190,000.00190,000.000.00190,000.00-190,000.000.00144000
3Budget 202414000007000001,400140,000.00140,000.000.00140,000.00-140,000.000.00144000
4Merit50000250005050,000.00190,000.00140,000.00190,000.00140,000.0050,000.000.00144000
5Vac Fact 202450000250005050,000.00240,000.00190,000.00240,000.00190,000.0050,000.000.00144000
6Replace12500062500125125,000.00365,000.00240,000.00365,000.00240,000.00125,000.000.00144000
7Growth12500062500125125,000.00490,000.00365,000.00490,000.00365,000.00125,000.000.00144000
8Transfer12500062500125125,000.00615,000.00490,000.00615,000.00490,000.00125,000.000.00144000
9Inflation60000300006060,000.00675,000.00615,000.00675,000.00615,000.0060,000.000.00144000
10New45000225004545,000.00720,000.00675,000.00720,000.00675,000.0045,000.000.00144000
11Savings-80000-40000-80-80,000.00640,000.00720,000.00720,000.00640,000.000.0080,000.00144000
12Others50000250005050,000.00690,000.00640,000.00690,000.00640,000.0050,000.000.00144000
13Budget 202519500009750001,950690,000.00690,000.000.00690,000.00-690,000.000.00144000
14Target 202516350008175001,635375,000.00375,000.000.00375,000.00-375,000.000.00144000
Sheet1
Cell Formulas
RangeFormula
G2:G14G2=Team_Data
H2H2=MIN(G2:G3,G13:G14)*0.9
I2:I3,I13:I14I2=G2:G3-$H$2
M2:M14M2=MAX(J2:K2)
N2:N14N2=MIN(J2:K2)
O2:O14O2=IF(I2>=0, M2-N2, 0)
P2:P14P2=IF(I2<0, M2-N2, 0)
Q2:Q14Q2=MAX($M$2:$N$14)*0.2
I4:I12I4=G4:G12
K4:K12K4=J4-I4
J2:J3,J13:J14J2=I2
J4:J12J4=J3+I4
Dynamic array formulas.
Named Ranges
NameRefers ToCells
Team_Data=INDEX(Sheet1!$B$2:$C$14, 0, MATCH(Sheet1!$E$2, Teams, 0))G2
Teams=Sheet1!$B$1:$C$1G2
Cells with Data Validation
CellAllowCriteria
E2List=Teams


In cell E2 you select the team you want to graph. Columns with green headers are the ones used in the graph.

Here i show you what the graph actually looks like without "hidding" some data.
1723203323391.png


First column sets the height of the actual data to graph, then comes the data. Positive data (increase) is in one column and negative data (decrease) in anothes so colors can be different. And finally a stacked bar chart doesn't allow you to add data labels above the highest value, so we use another hidden data column where we show the data labels in the middle.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top