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

How to add calculated column from Total in pivot table?

Hi,

I have pivot table as below. I need additional column Balance next to Total and it should calculate from Total-Tar

I am not getting column next to Total. please can anyone suggest me how to do this. I do not have possibility to use cross table.

   

dataTarD19/02/201622/02/201623/02/201624/02/201625/02/2016Total
AA32 4353116
DD32 1432010
ADS32 142209
dfs32 100%100%67%100% 90%
gfd32 3830822
wed32 48621130
sdf32 210011528
hgf32 710138925
edf32 000000
rew32 100012
7 Replies
alexandros17
Partner - Champion III
Partner - Champion III

I think this is not possible, total is automatically calculated before or after all columns (in the dimension).

Not applicable
Author

is there any possibility in any other way apart from pivot table?

marcus_sommer

You could add such a column if you added a dimension-value Balance to your date-field (maybe you used two identically fields - one for normal usage and one for this chart and then with Balance) and refers within the expression to them, like:

if(date = 'Balance', sum(total value) - Tar, sum(value))

or you could add simply a second horizontally dimension to your date-field, maybe month and queries this quite similar to the above if-loop with:

if(secondarydimensionality() = 0, sum(total value) - Tar, sum(value))

- Marcus

Not applicable
Author

Tried it . not showing values in column.

what do I need to pass in place of value? in above expressions?

marcus_sommer

sum(value) is a placeholder for YourExpression and you will need the total-version of them to get the sum over all dates.

- Marcus

Not applicable
Author

sorry I am not getting how to replace my expression with all dates

marcus_sommer

Please provide a small example app with a few inline-data.

- Marcus