Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Can anyone please help me with the if else ladder. Whenever I'm trying to convert the below statements into sense I'm getting a error :"Error in expression ')' expected. I'm creating this as a new measure.

Obsolete Stock value (Store) = if ((Daily Cost Price) IS Not Null && ((Csku status)                 

                    ==”INACTIVE” || (Buying Stop Date) < SYSDATE)), 

                     (Daily Cost Price)* (Closing stock on hand (Store)),

              

                   elseif ((Daily Demand Cost) IS Not NULL && ((Csku 

                   status) ==”INACTIVE” || (Buying Stop Date) == True),

                   , (Daily Demand Cost)* (Closing stock on hand (Store),

                    else,0)

1 Solution

Accepted Solutions
arasantorule
Contributor III

Re: Can anyone please help me with the if else ladder. Whenever I'm trying to convert the below statements into sense I'm getting a error :"Error in expression ')' expected. I'm creating this as a new measure.

Can you check if the below works.

= if ([Daily Cost Price] <> Null() and (([Csku status])='INACTIVE' or (Buying Stop Date) < Today()), ([Daily Cost Price])* ([Closing stock on hand (Store)]),

if([Daily Demand Cost] <> NULL() and  (([Csku status])='INACTIVE' or ([Buying Stop Date]) ='True'),([Daily Demand Cost])* ([Closing stock on hand (Store)]),0))

3 Replies
arasantorule
Contributor III

Re: Can anyone please help me with the if else ladder. Whenever I'm trying to convert the below statements into sense I'm getting a error :"Error in expression ')' expected. I'm creating this as a new measure.

Can you check if the below works.

= if ([Daily Cost Price] <> Null() and (([Csku status])='INACTIVE' or (Buying Stop Date) < Today()), ([Daily Cost Price])* ([Closing stock on hand (Store)]),

if([Daily Demand Cost] <> NULL() and  (([Csku status])='INACTIVE' or ([Buying Stop Date]) ='True'),([Daily Demand Cost])* ([Closing stock on hand (Store)]),0))

Not applicable

Re: Can anyone please help me with the if else ladder. Whenever I'm trying to convert the below statements into sense I'm getting a error :"Error in expression ')' expected. I'm creating this as a new measure.

Thanks a lot You're a savior.

Not applicable

Re: Can anyone please help me with the if else ladder. Whenever I'm trying to convert the below statements into sense I'm getting a error :"Error in expression ')' expected. I'm creating this as a new measure.

Does the NULL function work on a column or does it just works on expressions?