Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total of first dimension over second dimension

Hi Friends,

     I Need a pivot Table to show the Sub Total of on dimension as follows

Dimension1 Dimension2Dimension3
Aa2
b2
Total4
Ba3
b3
Total6
Totala5
b5
Total10

How can in acheive this without using set analysis.

11 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

      Go to properties -> presentation -> select dimention2 and check " Show partial sum"

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hi,

    

     Thanks, tried the same i get the result as

Dimension1 Dimension2Dimension3
Aa2
b2
Total4
Ba3
b3
Total6
TotalTotal10
Not applicable
Author

Sorry, I didn't acheive what i asked for.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You will not get the way you want, cause it will give you overall total for first dimension.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

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.

Not applicable
Author

Dear Arun,

     Thanks,can i attain it in anyother means.

Regards,

Bala

swuehl
MVP
MVP

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