Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
koushik_btech20
Creator
Creator

Condtion to set expression

Hi All,

I have this below expression which I want to implement by set analysis,

sum(if((SCEN_ID = 0 or SCEN_ID=AD_SCEN_ID) and COMPONENT_ID <> 0 and C_FLAG >= 0, C_QUANTITY))

Thanks

Koushik

1 Solution

Accepted Solutions
sunny_talwar

May be try this

Sum({<SCEN_ID = P(AD_SCEN_ID), COMPONENT_ID =-{'0'}, C_FLAG ={'>=0'}>+

<SCEN_ID = {0}, COMPONENT_ID =-{'0'}, C_FLAG ={'>=0'}>} C_QUANTITY)

View solution in original post

4 Replies
koushik_btech20
Creator
Creator
Author

I tried below expression but it is not working,

Sum({(<SCEN_ID={0}> + <SCEN_ID=AD_SCEN_ID>) * <COMPONENT_ID ={"<>0"}> * <C_FLAG ={">=0"}>} C_QUANTITY)

prashantbaste
Partner - Creator II
Partner - Creator II

Hi Koushik,

Try below expression -

Sum({<SCEN_ID=P(AD_SCEN_ID,0),  COMPONENT_ID ={'*'}-{'0'}, C_FLAG ={'>=0'} >}C_QUANTITY)

Please confirm if above works correct for you by marking Answer as Correct.

Regards,

Prashant P Baste

koushik_btech20
Creator
Creator
Author

Its throwing error as error in set modifier P function parameter list

sunny_talwar

May be try this

Sum({<SCEN_ID = P(AD_SCEN_ID), COMPONENT_ID =-{'0'}, C_FLAG ={'>=0'}>+

<SCEN_ID = {0}, COMPONENT_ID =-{'0'}, C_FLAG ={'>=0'}>} C_QUANTITY)