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

Showing rows with negative value

SET vLNegContribution =if(Sum({<ValueName={'Contribution-margin|Margin'}>}ValueSEK) <0, Sum({<ValueName={'Contribution-margin|Margin'}>}ValueSEK));

Hey Guys,

Above works pretty fine it gives me sum of contribution margin and when it's below 0 it outputs that row. all good.

But i would like to show every row where they have negative contribution margin. Not a sum.

Client can have 10 rows 9 of them are minus but as logn as 1 positive row  is larger it wont show.

I can take Market as dimension and it shows right values but if I add client it doesnt give me what I want

Is it possible to do this in one table if you understand?

1 Reply
sunny_talwar

May be try this:

Sum(Aggr(if(Sum({<ValueName={'Contribution-margin|Margin'}>}ValueSEK) <0, Sum({<ValueName={'Contribution-margin|Margin'}>}ValueSEK)), Market))