Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Partner - Champion
Partner - Champion

Try this

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

View solution in original post

4 Replies
Not applicable
Author

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
Partner - Champion
Partner - Champion

Try this

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

Not applicable
Author

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

Anonymous
Not applicable
Author

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