Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have the following stacked bar chart and want to display a running sum in each month :
So for example in Dec-19 I would want
LR7D = 58 + 7
LR30D = 58 + 7 + 9
The formaul used in the stacked bar chart is:
Pick(Only({1} VIZ_PeriodId)
,//1:
Sum({<RelativeYear={'-2'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeYear={'-2'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//2: Last Year
Sum({<RelativeYear={'-1'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeYear={'-1'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//3: YTD
Sum({<IsYTD={'Yes'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<IsYTD={'Yes'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//4:
Sum({<RelativeMonth={'-12'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-12'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//5:
Sum({<RelativeMonth={'-11'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-11'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//6:
Sum({<RelativeMonth={'-10'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-10'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//7:
Sum({<RelativeMonth={'-9'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-9'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//8:
Sum({<RelativeMonth={'-8'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-8'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//9:
Sum({<RelativeMonth={'-7'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-7'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//10:
Sum({<RelativeMonth={'-6'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-6'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//19:
Sum({<RelativeMonth={'-5'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-5'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//12:
Sum({<RelativeMonth={'-4'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-4'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//13:
Sum({<RelativeMonth={'-3'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-3'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//14:
Sum({<RelativeMonth={'-2'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-2'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
,//15:
Sum({<RelativeMonth={'-1'},CanonicalType={'SupplyContractStartDate'}>} (TOTAL_CONTRACT_MARGIN))/Sum({<RelativeMonth={'-1'},CanonicalType={'SupplyContractStartDate'}>} TOTAL (TOTAL_CONTRACT_MARGIN))
)
I've tried used the the accumulation modifer on this measure but it sems to only aggregate the first two stacks..
I've also tried using RangeSum in the formaula of the measure with some strange results..
Any pointers greatly appreciated..
Thanks
@NorrinRadd would you be able to share a sample file where we can see the issue?