Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If Statement Short-circuiting ERROR !!

Hello There,

I am facing problem when i am writing a condition with if statement which is not giving me the right values .

The Syntax is given below:

sum(if(vReportDate=[Posting Date] and (Season <>vCurrentSeason or (Season='NA' and Department='COR')),Quantity*-1))

I have to make a if statement in which posting date is the date which is entered by the user and season of a particular item is not equal to current season and also when season is NA and department is COR, it should NOT be included and rest all the season and department be included.

Kindly Help. I am Stuck !

1 Reply
Not applicable
Author

sum( 

          if (  ($(vReportDate)=[Posting Date] and Season <>$(vCurrentSeason))

                 or

                 (Season='NA' and Department='COR')

                ,

                Quantity*-1

            )

       )