Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read 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