Forum Discussion
Revenue vs Budget using Line and Stacked Column Chart
- 2 years ago
Hi shermayne123 ,
In this case you need to take into account that the switch makes it based on the order so for this you should do it the other way around start in tier 2 and end on tier 4.
Shortfall = SWITCH( TRUE(), [Secured]<[Total Tier 2 Budget],[Secured]-[Total Tier 2 Budget], [Secured]<[Total Tier 3 Budget],[Secured]-[Total Tier 3 Budget], [Secured]<[Total Tier 4 Budget],[Secured]-[Total Tier 4 Budget] )
Hi shermayne123 ,
For that you can use a SWITCH syntax were is the same as concatenated IF statments. would be something similar to:
Surplus =
SWITCH(
TRUE(),
[Actual]>[Total Tier 2 Budget],[Actual]-[Total Tier 2 Budget],
[Actual]>[Total Tier 3 Budget],[Actual]-[Total Tier 3 Budget],
...
)Hi Miguel,
Thanks for your advice!
With this switch function, how can I make it work for the shortfall from the tiers? I tried the following formula but it computes the difference from the highest tier instead of the nearest tier:
- MFelix2 years agoSuper User
Hi shermayne123 ,
In this case you need to take into account that the switch makes it based on the order so for this you should do it the other way around start in tier 2 and end on tier 4.
Shortfall = SWITCH( TRUE(), [Secured]<[Total Tier 2 Budget],[Secured]-[Total Tier 2 Budget], [Secured]<[Total Tier 3 Budget],[Secured]-[Total Tier 3 Budget], [Secured]<[Total Tier 4 Budget],[Secured]-[Total Tier 4 Budget] )- shermayne1232 years agoHelper I
Hi Miguel,
Thanks so much for pointing out the correct way to compute the shortfall. Now I am able to present this results in a matrix table visual.
I've one related question i.e. if I want to present this in a stacked column chart format, how can I get the shortfall to be stacked on top of the actuals instead of being in the negative zone under the y-axis? And is it possible to have the nearest tier budget to be presented as a line/marker in the stacked column?