Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Partial Sum calculation in Pivot table

Hi Team,

Here I have attached sample qvw.

My Requirement,

1. I need to convert negative numbers [sum(F1-F2)] to zero,for that purpose i have used Range max function

2. I have to calculate Partial sum,while calculating it takes the negative numbers too.But In straight table it is working perfectly

Could you help me to solve this issue.

Thanks in advance.

Capture8.PNG

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Pivot table 'sum of rows':

=Sum(Aggr(RangeMax(sum(F1-F2), 0), F1, F2))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Pivot table 'sum of rows':

=Sum(Aggr(RangeMax(sum(F1-F2), 0), F1, F2))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
PrashantSangle

Hi,

Use Aggr()

Try like

SUM(aggr(IF(SUM(F1-F2)>0,SUM(F1-F2),0),F1,F2))

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂