Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Custom row in a pivot table

hi,

I have the following pivot table :

Header 1Header 2
r1100
r230
r350
r4-
r590

I need to add in the pivot table a cell wich contain a custom expression where "Header 1=r4". the expression is in depending of other rows. for example :

r4 = r1 + r2 - r3. So my pivot table will be like this:

Header 1Header 2
r1100
r230
r350
r480
r590

Could you help me please to find a solution.

Regards,

Yacine

Labels (1)
1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

you could write something like: ( I don't know the expression for Header2, I guess it is sum (Header2))

if( Header1='r4', sum( {<Header2 = {r1,r2}>} total Header2)-sum( {<Header2 = {r3}>} total Header2)

, sum(Header2) )

... but I think it may be difficult to write an expression to work in a more general situation..

Hope this helps for now,

Erich

View solution in original post

1 Reply
erichshiino
Partner - Master
Partner - Master

you could write something like: ( I don't know the expression for Header2, I guess it is sum (Header2))

if( Header1='r4', sum( {<Header2 = {r1,r2}>} total Header2)-sum( {<Header2 = {r3}>} total Header2)

, sum(Header2) )

... but I think it may be difficult to write an expression to work in a more general situation..

Hope this helps for now,

Erich