Hello all. Have a PT question I can't find a solution for. I may be overthinking it or going about it the wrong way but...
I have a data set that has item information broken into different segments. In this example, X, Y, Z. I'm using a PT to give me simple subtotals, % increases to last year, & actual difference to LY. What I also need is to calculate what % of that item's actual increase or decrease was to that segment's subtotal of LY.
For example, Item X1 sold 2 more units this year than last year. I need to understand what % the 2 unit difference made up of the overall -3.43% increase. To do that, you take the diff and divide it into the total LY sales for that segment; in this case, all of just the X's. Problem is, I can't get a formula to take the Diff column values for each X Item and divide it by the LY subtotal. I can get the '% of' option to work for either the total parent or grand total but I cannot figure out how to have each segment's diff divide into that segment's LY subtotal.
Can I accomplish this via a PT?
[TABLE="width: 432"]
<colgroup><col><col span="4"><col></colgroup><tbody>[TR]
[TD="align: center"]Item[/TD]
[TD="align: center"]TY[/TD]
[TD="align: center"]LY[/TD]
[TD="align: center"]Increase[/TD]
[TD="align: center"]Diff[/TD]
[TD="align: center"]% of LY Subtotal[/TD]
[/TR]
[TR]
[TD="align: center"]X1[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"]48[/TD]
[TD="align: center"]4.17%[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]0.86%[/TD]
[/TR]
[TR]
[TD="align: center"]X2[/TD]
[TD="align: center"]75[/TD]
[TD="align: center"]60[/TD]
[TD="align: center"]25.00%[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]6.44%[/TD]
[/TR]
[TR]
[TD="align: center"]X3[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"]125[/TD]
[TD="align: center"]-20.00%[/TD]
[TD="align: center"]-25[/TD]
[TD="align: center"]-10.73%[/TD]
[/TR]
[TR]
[TD="align: center"]X Subtot[/TD]
[TD="align: center"]225[/TD]
[TD="align: center"]233[/TD]
[TD="align: center"]-3.43%[/TD]
[TD="align: center"]-8[/TD]
[TD="align: center"]-3.43%[/TD]
[/TR]
[TR]
[TD="align: center"]Y1[/TD]
[TD="align: center"]65[/TD]
[TD="align: center"]48[/TD]
[TD="align: center"]35.42%[/TD]
[TD="align: center"]17[/TD]
[TD="align: center"]6.59%[/TD]
[/TR]
[TR]
[TD="align: center"]Y2[/TD]
[TD="align: center"]200[/TD]
[TD="align: center"]175[/TD]
[TD="align: center"]14.29%[/TD]
[TD="align: center"]25[/TD]
[TD="align: center"]9.69%[/TD]
[/TR]
[TR]
[TD="align: center"]Y3[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"]35[/TD]
[TD="align: center"]42.86%[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]5.81%[/TD]
[/TR]
[TR]
[TD="align: center"]Y Subtot[/TD]
[TD="align: center"]315[/TD]
[TD="align: center"]258[/TD]
[TD="align: center"]22.09%[/TD]
[TD="align: center"]57[/TD]
[TD="align: center"]22.09%[/TD]
[/TR]
[TR]
[TD="align: center"]Z1[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"]48[/TD]
[TD="align: center"]4.17%[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]1.69%[/TD]
[/TR]
[TR]
[TD="align: center"]Z2[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]50.00%[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]4.24%[/TD]
[/TR]
[TR]
[TD="align: center"]Z3[/TD]
[TD="align: center"]30[/TD]
[TD="align: center"]60[/TD]
[TD="align: center"]-50.00%[/TD]
[TD="align: center"]-30[/TD]
[TD="align: center"]-25.42%[/TD]
[/TR]
[TR]
[TD="align: center"]Z Subtot[/TD]
[TD="align: center"]95[/TD]
[TD="align: center"]118[/TD]
[TD="align: center"]-19.49%[/TD]
[TD="align: center"]-23[/TD]
[TD="align: center"]-19.49%[/TD]
[/TR]
</tbody>[/TABLE]
I have a data set that has item information broken into different segments. In this example, X, Y, Z. I'm using a PT to give me simple subtotals, % increases to last year, & actual difference to LY. What I also need is to calculate what % of that item's actual increase or decrease was to that segment's subtotal of LY.
For example, Item X1 sold 2 more units this year than last year. I need to understand what % the 2 unit difference made up of the overall -3.43% increase. To do that, you take the diff and divide it into the total LY sales for that segment; in this case, all of just the X's. Problem is, I can't get a formula to take the Diff column values for each X Item and divide it by the LY subtotal. I can get the '% of' option to work for either the total parent or grand total but I cannot figure out how to have each segment's diff divide into that segment's LY subtotal.
Can I accomplish this via a PT?
[TABLE="width: 432"]
<colgroup><col><col span="4"><col></colgroup><tbody>[TR]
[TD="align: center"]Item[/TD]
[TD="align: center"]TY[/TD]
[TD="align: center"]LY[/TD]
[TD="align: center"]Increase[/TD]
[TD="align: center"]Diff[/TD]
[TD="align: center"]% of LY Subtotal[/TD]
[/TR]
[TR]
[TD="align: center"]X1[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"]48[/TD]
[TD="align: center"]4.17%[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]0.86%[/TD]
[/TR]
[TR]
[TD="align: center"]X2[/TD]
[TD="align: center"]75[/TD]
[TD="align: center"]60[/TD]
[TD="align: center"]25.00%[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]6.44%[/TD]
[/TR]
[TR]
[TD="align: center"]X3[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"]125[/TD]
[TD="align: center"]-20.00%[/TD]
[TD="align: center"]-25[/TD]
[TD="align: center"]-10.73%[/TD]
[/TR]
[TR]
[TD="align: center"]X Subtot[/TD]
[TD="align: center"]225[/TD]
[TD="align: center"]233[/TD]
[TD="align: center"]-3.43%[/TD]
[TD="align: center"]-8[/TD]
[TD="align: center"]-3.43%[/TD]
[/TR]
[TR]
[TD="align: center"]Y1[/TD]
[TD="align: center"]65[/TD]
[TD="align: center"]48[/TD]
[TD="align: center"]35.42%[/TD]
[TD="align: center"]17[/TD]
[TD="align: center"]6.59%[/TD]
[/TR]
[TR]
[TD="align: center"]Y2[/TD]
[TD="align: center"]200[/TD]
[TD="align: center"]175[/TD]
[TD="align: center"]14.29%[/TD]
[TD="align: center"]25[/TD]
[TD="align: center"]9.69%[/TD]
[/TR]
[TR]
[TD="align: center"]Y3[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"]35[/TD]
[TD="align: center"]42.86%[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]5.81%[/TD]
[/TR]
[TR]
[TD="align: center"]Y Subtot[/TD]
[TD="align: center"]315[/TD]
[TD="align: center"]258[/TD]
[TD="align: center"]22.09%[/TD]
[TD="align: center"]57[/TD]
[TD="align: center"]22.09%[/TD]
[/TR]
[TR]
[TD="align: center"]Z1[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"]48[/TD]
[TD="align: center"]4.17%[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]1.69%[/TD]
[/TR]
[TR]
[TD="align: center"]Z2[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]50.00%[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]4.24%[/TD]
[/TR]
[TR]
[TD="align: center"]Z3[/TD]
[TD="align: center"]30[/TD]
[TD="align: center"]60[/TD]
[TD="align: center"]-50.00%[/TD]
[TD="align: center"]-30[/TD]
[TD="align: center"]-25.42%[/TD]
[/TR]
[TR]
[TD="align: center"]Z Subtot[/TD]
[TD="align: center"]95[/TD]
[TD="align: center"]118[/TD]
[TD="align: center"]-19.49%[/TD]
[TD="align: center"]-23[/TD]
[TD="align: center"]-19.49%[/TD]
[/TR]
</tbody>[/TABLE]