Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

krithikarees
New Contributor

Error in expression : if takes 2-3 parameters

I am trying to create a variable  if Clearing date is null or greater than calendar date (which is the selected date)  to put it in a aging bucket  --- if it falls in a criteria else needs to be $0 if it has a clearing date.

the aging bucket expression I already have in place is :: (Which works great!)

=sum(if($(vCalendarDate)- num([Net due date]) > 60 and $(vCalendarDate) - num([Net due date]) <= 90, [Debit/Credit Amount],0))

this is the variable expression I need help with :

IF ( isnull  ( num  (  [Clearing Date] ) )  or IF  (  num  (  [Clearing Date] > Calendar_Day  ) ))

Can anyone help me with this?

6 Replies

Re: Error in expression : if takes 2-3 parameters

May be like this

If(IsNull([Clearing Date]) or [Clearing Date] > Calendar_Day, .....

krithikarees
New Contributor

Re: Error in expression : if takes 2-3 parameters

That did not work. I am not sure why It gives me that error

JustinDallas
Valued Contributor

Re: Error in expression : if takes 2-3 parameters

What are you trying to say with this?

 num  (  [Clearing Date] > Calendar_Day  )
jerifortune
Contributor II

Re: Error in expression : if takes 2-3 parameters

Try passing the date field through GetFieldSelections() since you want the calendar date based on user selection.

sasiparupudi1
Honored Contributor III

Re: Error in expression : if takes 2-3 parameters


If(IsNull([Clearing Date]) or [Clearing Date] > Calendar_Day,'Age bucket',0)

krithikarees
New Contributor

Re: Error in expression : if takes 2-3 parameters

Clearing date is the closing date of invoice and Calendar date is the date based on selection.

Community Browser