Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

koushik_btech20
Contributor

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

Re: Condtion to set expression

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
Contributor

Re: Condtion to set expression

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)

Highlighted
Partner
Partner

Re: Condtion to set expression

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
Contributor

Re: Condtion to set expression

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

Re: Condtion to set expression

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