Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

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
MVP
MVP

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)