Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: Partial Sum calculation in Pivot table

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
2 Replies
MVP
MVP

Re: Partial Sum calculation in Pivot table

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

Re: Partial Sum calculation in Pivot table

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.
Community Browser