Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Row totals

I'm quiet new on this and maby have a simple question:  In a Pivot table I have a row with a condition: If(Column(5)=0, Column(1),0)  But the row totals applies the same condition instead of summing the rows indivdual results.  I have been searching and found several solutions about If and Aggr, but have not been able to get teh row's total correctly calculated.  Please advise if anybody has a solution!  Best regards

33 Replies
Anonymous
Not applicable
Author

Where points Dimensionality  at?? It works when expanded until article level, but not when I expand to [Cliente NIF] level.. Also if I change colums (i.e. [Cliente NIF] in stead of article, it al messed up...

sunny_talwar

Hahahaha yes it is... what is the expected output based on expanding and collapsing? Your row level information was also changing when you expanded collapsed the dimensions... was that part correct?

Anonymous
Not applicable
Author

Chichi... Yes it was correct, as I want to show increased sales seperated from new sales (if sales Y-1 are 0, it is supposed to be shown in another column, but I didn't want to borther yo all with the final and complete design as if once understood how the column and the row total works, I suppose that I can do the famous copy and paste to the other columns!! But when expanding, info is correctly shown, except the f... row total!!!

Anonymous
Not applicable
Author

Yes it was correct, as I want to show increased sales seperated from new sales (if sales Y-1 are 0, it is supposed to be shown in another column, but I didn't want to borther yo all with the final and complete design as if once understood how the column and the row total works, I suppose that I can do the famous copy and paste to the other columns!! But when expanding, info is correctly shown, except the row total!

qliksus
Specialist II
Specialist II

Maybe try the below one

(Sum ({<Y= {$(=Max(Y))}>} [Venta Neta])-Sum ({<Y= {$(=Max(Y)-1)}>}[Venta Neta]) )  *


((Sum ({<Y= {$(=Max(Y)-1)}>}[Venta Neta])<Sum ({<Y= {$(=Max(Y))}>}[Venta Neta]) and Sum ({<Y= {$(=Max(Y)-1)}>}[Venta Neta])<>0) * -1)

sunny_talwar

Can you provide numerical output you are looking for when the chart is expanded?

Anonymous
Not applicable
Author

Individual result is correct but still row totals are not ok. In this solutions it shows zero

Anonymous
Not applicable
Author

I only refer to the Real data and your added last column. Forget about the budget output.

This level is ok:

Expand_1_ok.png

This level is worng: Pan expanded should be 144 in it's subtotal and the grand total should be 57.480.

Expand_2_not_ok.png

This level is less wrong as Grup Cliente's subtotal is ok, but still de grand total is wrong, should be 57.480....

Expand_3_not_ok.png

qliksus
Specialist II
Specialist II

fine then modify the expression as something below

sum(aggr(  (Sum ({<Y= {$(=Max(Y))}>} [Venta Neta])-Sum ({<Y= {$(=Max(Y)-1)}>}[Venta Neta]) )  *


((Sum ({<Y= {$(=Max(Y)-1)}>}[Venta Neta])<Sum ({<Y= {$(=Max(Y))}>}[Venta Neta]) and Sum ({<Y= {$(=Max(Y)-1)}>}[Venta Neta])<>0) * -1) , dim1,dim2)

Anonymous
Not applicable
Author

Thanx, doesn't work either.. I'm going to think about other alternatives, it seems imposisble...