Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to filter over rows with If?

Hi, why do i miss the two amounts of Orderno 2 in the second table?

Screen.png

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: How to filter over rows with If?

The problem is that your if statement doesn't aggregate. So for any OrderNo with more than one record it can't determine which sum(Amount) it should use. Sum(200) or sum(120).

What you probably want is the other way around: sum(if(PartGroup='PartB' and left(PartNo,1)=3,Amount)).

You can rewrite that to a set analysis expression:

sum({<PartGroup={'PartB'},PartNo={"=left(PartNo,1)=3"}>} Amount)


talk is cheap, supply exceeds demand
2 Replies
MVP & Luminary
MVP & Luminary

Re: How to filter over rows with If?

The problem is that your if statement doesn't aggregate. So for any OrderNo with more than one record it can't determine which sum(Amount) it should use. Sum(200) or sum(120).

What you probably want is the other way around: sum(if(PartGroup='PartB' and left(PartNo,1)=3,Amount)).

You can rewrite that to a set analysis expression:

sum({<PartGroup={'PartB'},PartNo={"=left(PartNo,1)=3"}>} Amount)


talk is cheap, supply exceeds demand
Not applicable

Re: How to filter over rows with If?

Hi, perfect. Thanks! Zach.