Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
I Need a pivot Table to show the Sub Total of on dimension as follows
Dimension1 | Dimension2 | Dimension3 |
---|---|---|
A | a | 2 |
b | 2 | |
Total | 4 | |
B | a | 3 |
b | 3 | |
Total | 6 | |
Total | a | 5 |
b | 5 | |
Total | 10 |
How can in acheive this without using set analysis.
HI,
Go to properties -> presentation -> select dimention2 and check " Show partial sum"
Regards,
Kaushik Solanki
Hi,
Thanks for your answer... I can get the Total Part of the Dimension2 but how am to acheive the Total for Dimension1 as mentioned in the table above
Hi,
You can get the over all total for dimension1, with same logic. Just select dimention1 in presentation and check the show partial sum.
Regards,
Kaushik Solanki
Hi,
Thanks, tried the same i get the result as
Dimension1 | Dimension2 | Dimension3 |
---|---|---|
A | a | 2 |
b | 2 | |
Total | 4 | |
B | a | 3 |
b | 3 | |
Total | 6 | |
Total | Total | 10 |
Sorry, I didn't acheive what i asked for.
Hi,
You will not get the way you want, cause it will give you overall total for first dimension.
Regards,
Kaushik Solanki
Hi Bala,
What kaushik said is right. you can't get the sub total for the first dimension like what u would have got for the second dimension by using partial sum. but this s the perfect solution for your problem.
Regards,
Arun Prasadh.N.
Dear Arun,
Thanks,can i attain it in anyother means.
Regards,
Bala
You could create a new dimension Value for your first dimension, that will hold the total:
INPUT:
LOAD * INLINE [
DIM1, DIM2, Value
A, a, 2
A, b, 2
B, a, 3
B, b, 3
];
LOAD
'TOTAL' as DIM1,
DIM2,
sum(Value) as Value
Resident INPUT group by DIM2;
This should show the exact table that you required, see attached. The values precalculated in the script are not selection sensitive, though. But you could check for the DIM1 value and calculate the Totals on the fly, too, like this
=if(DIM1<>'TOTAL',sum(Value), sum({<DIM1 -= {TOTAL}>} total<DIM2> Value))
Please see attached.
Stefan