Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
bue
Contributor
Contributor

If Syntax

Hi,

I have following problem:

I'm trying to count Created_Date, if Field1 or Field2 is null and afterwards present the counted number for each month in a linechart.

So i did that: if(Field1 == null or Field2==null, Count(Created_Date), return null)

But it is not working.. does anyone know what i am doing wrong?

 

Thanks in advance!

 

Thanks in advance!

1 Reply
Or
MVP
MVP

That syntax doesn't even resemble Qlik script - I'd suggest using the Help pages as a general approach to getting the right syntax.

In this case, the syntax would be:

If(Isnull(Field1) or Isnull(Field2),Count(Created_Date_Neu))

But this would only work if Field1 and Field2 are "Global", not something that you're checking for each individual line. If the latter is the case, the if() statement would need to be inside the Count().