Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to calculate a weighted subtotal for the Total column.
Calculation for Weight:
sum({$<Cov_Mth_Date={'12/31/2017'}>}TOTAL <Market,County_Name> TotalMM)/sum({$<Cov_Mth_Date={'12/31/2017'}>}TOTAL <Market> TotalMM)
Percent:
sum({$<Cov_Mth_Date={'12/31/2017'}>}TOTAL <Market,County_Name> TotalMM)/sum({$<Cov_Mth_Date={'12/31/2017'}>}TOTAL <Market> TotalMM)*([Bnchmrk])
Total:
Sum(Total<Market,County_Name>(aggr(sum({$<Cov_Mth_Date={'12/31/2017'}>}TOTAL <Market,County_Name> TotalMM)/sum({$<Cov_Mth_Date={'12/31/2017'}>}TOTAL <Market> TotalMM)*([Bnchmrk]),[Bnchmrk])))
I would like to be able to drop the Weight and Percent columns and just use the Total Column. Market 1 total should be $873. Market 2 should be $861, or the sum of the percent column. I know I'm close....
Market | County | TotalMM | Bnchmrk | Weight | Percent | Total |
1 | Market Total | 2239 | 100.00% | $5,235 | ||
1 | A | 276 | $846 | 12.33% | $104 | $846 |
1 | B | 590 | $881 | 26.35% | $232 | $881 |
1 | C | 58 | $891 | 2.59% | $23 | $891 |
1 | D | 392 | $843 | 17.51% | $148 | $843 |
1 | E | 392 | $891 | 17.51% | $156 | $891 |
1 | F | 531 | $883 | 23.72% | $209 | $883 |
2 | Market Total | 2229 | 100.00% | $2,574 | ||
2 | G | 454 | $860 | 20.37% | $175 | $860 |
2 | H | 1116 | $874 | 50.07% | $437 | $874 |
2 | I | 659 | $840 | 29.56% | $248 | $840 |
Brilliant! Thanks it worked!
No problem at all... I am glad we were able to help....
Please close the thread by marking correct and helpful responses.
Best,
Sunny