Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If statement

I'm trying to find a better way of doing this if statement. How would you go about saying, if(isnull(Year) = -1 then set the year = 2010.

I'm currently doing this and am hoping to find a method that is a bit more efficient.

if(isnull([Fiscal Year]) = -1, sum({$<[Fiscal Year]={2010}>}

Thanks,

1 Reply
Not applicable
Author


Hello,
when I read the first part of your question "... if(isnull(Year) = -1 then set the year = 2010 ...", that is translated as:
if(isnull(Year),2010)
But you probably want to keep the non null values, which gives:
if(isnull(Year),2010,Year)
From your explanation, I do not understand why the "sum" appears in your formula.
Greetings,
Piet