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

how to show sum column wise in pivot table

hello community,

so here's my problem i want to show sum of amount based on the code and in the year name field

example:

code,name     fy year name

                         2017-18

31                         -

41                         -

51                    767503.8

61                    84231

total of 51,61   851734.8

71                    1021542..

81                    309308

          <and so on>

so can anyone help me how can i achieve this

for now my measure is simply sum(amount)

balsheet.PNG

Please help me with this..

4 Replies
ali_hijazi
Partner - Master II
Partner - Master II

sum(aggr(sum({<code={31,41,51,61,71}>}amount),year))

hope this helps

I can walk on water when it freezes
Anonymous
Not applicable
Author

yess  thanks its true we are halfway there,

i used it this way :

sum({<Code={51,61}>}aggr(sum( {<Code={51,61}>} Amount),[FY Year Name]))

but its showing me the sum in the field of 51 - balsheet 2.0.PNG

is there any way i can put total field horizontally below 61 in this table?

ali_hijazi
Partner - Master II
Partner - Master II

in the Dimension definition put if (match(code,'51','61'),'Total', code)

I can walk on water when it freezes
ali_hijazi
Partner - Master II
Partner - Master II

or you can add a new column in script

let's say Code_2

and you put if (match(code,'51','61'),Total,code) as Code_2

and in the chart you use Code_2 instead of Code

I can walk on water when it freezes