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,
How is the calculation for the blue bar done? If you are using different calculations when you over the blue bar you should get only the blue bar value.
To what I can understand you want that the blue bar present the budget correct?
- shermayne1232 years agoHelper I
Hi Miguel,
Thanks for responding and apologies for the delay.
This is the formula I used for the blue bar:
Annual Secured = MIN([Total Forecasts],[Annual Tier 2 Budget])How do I get it to change to Annual Tier 2 Budget if the Total Forecasts is higher than the Annual Tier 2 Budget? In this case, the value is the Annual Tier 2 Budget but it's still showing the variable/measure name as Annual Secured. Thank you.- MFelix2 years agoSuper User
Hi shermayne123 ,
Based on what you wrote you just need name to have different names correct and the values are the ones that should be presented, is this assumption correct?
In this case what I believe you need to do is to have different measures for the different values meaning:- Actuals Below Target = IF([Total Forecasts] > [Annual Tier 2 Budget],[Annual Tier 2 Budget])
- Until target value = IF([Total Forecasts] > [Annual Tier 2 Budget],[Total Forecasts] - [Annual Tier 2 Budget])
- Target Value = IF([Total Forecasts] <= [Annual Tier 2 Budget],[Total Forecasts])
- Above Target Value = IF([Total Forecasts] <= [Annual Tier 2 Budget], [Annual Tier 2 Budget]-[Total Forecasts] )
This will allow for different colour and different names on your visualization.
- shermayne1232 years agoHelper I
Hi Miguel,
Thank you for the detailed formulae.
Yes you got it right that I want the names to show differently for different scenarios.
I've adjusted your formulae for my purpose as follows:
Surplus = IF([Actual]>[Total Tier 2 Budget],[Actual]-[Total Tier 2 Budget])
Shortfall = IF([Actual]<=[Total Tier 2 Budget],[Total Tier 2 Budget]-[Actual])Actual = SUM([Secured revenue])So it is working now. But then I noticed that if the actual is above tier 2 budget, how can I set the formula such that it will go on and check tier 3 budget and use tier 3 budget to less off the actuals to derive the surplus? Is there a if-else formula to use? Thank you so much!