Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
LovelyPints
Contributor
Contributor

Group By Column A, Sum Column B, Drop if Sum(Column B =0)

Hi guys,

I have a table that has a list of all charges (column A), then I have a transaction count column (Column B). 

As a charge is added the transaction count gets a 1. If we need to remove a transaction the same row is duplicated but the Column B value gets a -1

Is there a way in the data load editor to group the charges by column A, sum the Column B values and only keep the column A values as can be seen below 

Charges Transaction Count
Item1 1
Item1 -1
Item1 1
Item2 1
Item2 -1

 

And then to end up with the below table

Charges Transaction Count
Item1 1

 

Any help greatly appreciated!

Labels (5)
1 Solution

Accepted Solutions
brunobertels
Master
Master

Hi 

may be this 

load

A,

Sum( B)

from... 

group by A where Sum(B) >0;

View solution in original post

1 Reply
brunobertels
Master
Master

Hi 

may be this 

load

A,

Sum( B)

from... 

group by A where Sum(B) >0;