IainStewart
8 years agoQrew Member
Cumulative bar graph/nested IF
Hi, I'm tryign to produce a cumulative bar graph showing cumulative months along the X axis & value on the Y axis, i can create the below which provides total value by month:
If([Month]="01. Jan", [YTD Jan],
[Month]="02. Feb", [YTD Feb],
[Month]="03. Mar", [YTD Mar],
[Month]="04. Apr", [YTD Apr],
[Month]="05. May", [YTD May],
[Month]="06. Jun", [YTD Jun],
[Month]="07. Jul", [YTD Jul],
[Month]="08. Aug", [YTD Aug],
[Month]="09. Sep", [YTD Sep],
[Month]="10. Oct", [YTD Oct],
[Month]="11. Nov", [YTD Nov],
[Month]="12. Dec", [YTD Dec],
0)
And if i do only one i.e. (i just used Jan as an example):
If([Month]="01. Jan", [YTD Feb]+[YTD Jan],
0)
This adds up Jan & Feb
However if i start with Jan on it's own and then try Feb:
If([Month]="01. Jan", [YTD Jan],
[Month]="02. Feb", [YTD Jan]+[YTD Feb],
0)
It displays Jan on it's own but nothing in the graph for Feb so 0.
Any assistance or guidance would be much appreciated?
Thanks
If([Month]="01. Jan", [YTD Jan],
[Month]="02. Feb", [YTD Feb],
[Month]="03. Mar", [YTD Mar],
[Month]="04. Apr", [YTD Apr],
[Month]="05. May", [YTD May],
[Month]="06. Jun", [YTD Jun],
[Month]="07. Jul", [YTD Jul],
[Month]="08. Aug", [YTD Aug],
[Month]="09. Sep", [YTD Sep],
[Month]="10. Oct", [YTD Oct],
[Month]="11. Nov", [YTD Nov],
[Month]="12. Dec", [YTD Dec],
0)
And if i do only one i.e. (i just used Jan as an example):
If([Month]="01. Jan", [YTD Feb]+[YTD Jan],
0)
This adds up Jan & Feb
However if i start with Jan on it's own and then try Feb:
If([Month]="01. Jan", [YTD Jan],
[Month]="02. Feb", [YTD Jan]+[YTD Feb],
0)
It displays Jan on it's own but nothing in the graph for Feb so 0.
Any assistance or guidance would be much appreciated?
Thanks