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: 
separerl
Contributor III
Contributor III

Pivot table, Partial sums , highest value, Total not working

Hi !

I am trying to create a Chart Pivot Table with partial sums
The highest value of Units are those who are interestingProblem Partial Sums Highest value.png

As the Expression I use:
if(Units = Max(TOTAL <[User],[Company]> Units), Units, 0)

It works fine with setting 0 value on those rows who has lower value that the highest , but the show partial sums does not work
How should I solve this ?


The raw data , with and ordinary sum(Units) is working fine
Working fine.png

 

I enclose a Qlikview sample problem file 

Labels (1)
1 Solution

Accepted Solutions
rubenmarin

Hi, using just [Units] in subtotals won't work if there are more than one value, in that case [Units] will be null, as no aggregation is specified.

Maybe with this expression:

Sum(Aggr(Max(TOTAL <[User],[Company]> Units),User,Company))

View solution in original post

4 Replies
anat
Master
Master

Use aggr function like

Sum(if(Units = Max(TOTAL <[User],[Company]> Units), Units, 0)) 

rubenmarin

Hi, using just [Units] in subtotals won't work if there are more than one value, in that case [Units] will be null, as no aggregation is specified.

Maybe with this expression:

Sum(Aggr(Max(TOTAL <[User],[Company]> Units),User,Company))

separerl
Contributor III
Contributor III
Author

Hi !
Thanks very much for reply.
When applying the expression , I get correct sum for the Company level , but per User, it still does not calculate right
Problem Partial Sums Highest value v2.png

separerl
Contributor III
Contributor III
Author

Forget the last posting , incorrect by me. It works with the suggested solution