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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
sunnybi
Contributor III
Contributor III

Sum of rows in pivot table

Hi everyone, 

Hope y'all have a nice summer time . 

I got an issue with a pivot table  . As you can see in the table below on the 2nd line , the total is uncorrect. Capture d’écran 2025-08-18 161535.png

The expression return the correct values . the pivot table got only 1 dimension 'week_number'

I tried  :   sum(aggr ( expression, week_number))  and the total is uncorrect. 

Basically , the expression is  : if column(1) < column(4) then  column(4) - column(1) else 0 . 

Feel free to ask any question. 

Thank you for your help ! 

 

 

Labels (1)
1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

 

I don't think that you can use the Column() function in combination with AGGR() - you probably need to repeat the expressions for columns 4 and 1. Also, you can simplify your formula a bit - instead of asking IF..., use Rangemax():

Rangemax(A-B, 0) 

If A < B, then zero will be the max.

Cheers,

Oleg Troyansky

Ask me about Qlik Sense Expert Class!

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi there,

 

I don't think that you can use the Column() function in combination with AGGR() - you probably need to repeat the expressions for columns 4 and 1. Also, you can simplify your formula a bit - instead of asking IF..., use Rangemax():

Rangemax(A-B, 0) 

If A < B, then zero will be the max.

Cheers,

Oleg Troyansky

Ask me about Qlik Sense Expert Class!
sunnybi
Contributor III
Contributor III
Author

1000 thanks to you