Announcements
cancel
Showing results 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.

1 Solution

Accepted Solutions
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
2 Replies
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

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