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

If to Set analysis

 

I am having problem to convert this expression to Set analysis......Thanks

=count(if(CDE <> null() and (TYPE_CDE = '00001' OR MAC_CDE = null()) and STATUS <> 'CANCEL' and REQUEST= 1,ORDER))

1 Solution

Accepted Solutions
celambarasan
Not applicable

Re: If to Set analysis

Try this

Count({<CDE={*},TYPE_CDE={'00001'}, STATUS={*}, REQUEST={1}> + <CDE={*},MAC_CDE-={*}, STATUS={*}, REQUEST={1}>} ORDER)

4 Replies
Not applicable

Re: If to Set analysis

HI,

For the condition (TYPE_CDE = '00001' OR MAC_CDE = null()), I recommend to create a flag in the script, something like:

select *,

         if(TYPE_CDE = '00001' OR isnull(MAC_CDE),1,0) as Flag_CDE

from ...

Then the expression should be:

count({$<CDE={*},STATUS-={'CANCEL'},REQUEST={1},Flag_CDE={1}>} ORDER)

Hope this helps

Regards!

celambarasan
Not applicable

Re: If to Set analysis

Try this

Count({<CDE={*},TYPE_CDE={'00001'}, STATUS={*}, REQUEST={1}> + <CDE={*},MAC_CDE-={*}, STATUS={*}, REQUEST={1}>} ORDER)

Not applicable

Re: If to Set analysis

Thankyou Celembarasan, I am bit confused......Actually I am having lot of conditions but I mentioned the key conditions where I was having problem.....for representing OR condition Is this the only way, need to specify all the conditions again....Thanks

mov
Not applicable

Re: If to Set analysis

The way to handle OR condition suggested by Gabriela allows to avoid repeating all over again.  Apparently you need to modify the script in this case.

Regards,

Michael