Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
tmumaw
Valued Contributor

Null vs. Not Null

Good Morning Everyone,

I am trying to populate Accq_Inv_Gross with Inv Gross if Customer Group 4 is not null, and populate Davey_Inv_Gross with Inv_Gross if Customer Group 4 is Null, however my logic must not be correct. Any suggestions?

Thanks

If(len([Customer Group 4]) > 0, [Inv Gross],0) as [Accq_Inv_Gross],


if(isnull([Customer Group 4]),[Inv Gross],0) as [Davey_Inv_Gross],

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Null vs. Not Null

Thom

I dont see anything wrong with your logic. What is happening that is not correct?

Jonathan

PS I would use len([Customer Group 4])=0 rather than isnull, but that wont change the results

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

6 Replies
MVP
MVP

Null vs. Not Null

Thom

I dont see anything wrong with your logic. What is happening that is not correct?

Jonathan

PS I would use len([Customer Group 4])=0 rather than isnull, but that wont change the results

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

Not applicable

Null vs. Not Null

Thom

I agree with Jonathan, that the logic is OK.

Check to see if the actual value you are checking are really null.

If you load numbers from Excel tables, QV will translate nulls on the sheet into "" in QV (blank string rather than a true null).

tmumaw
Valued Contributor

Null vs. Not Null

Thanks. It works fine. I changed the isnull to length = 0. I have another question. I want to do a count distinct customers. I tried this but with no luck. I'm having a hard time with the Great Than sign since set analysis also uses it.

Count({$<(len([Customer Group 4]) > 0>} distinct Customer

Thanks

Not applicable

Null vs. Not Null

Hi, try this:

Count({$< [Customer Group 4] = {"=len([Customer Group 4]) > 0"} > } distinct Customer)

Best Regards

tmumaw
Valued Contributor

Null vs. Not Null

Ivan,

You have just made my Friday and weekend. Thanks for all your help yet again.

Thom

tmumaw
Valued Contributor

Null vs. Not Null

Jonathan and Bruce,

You both also made my Friday much more enjoyable. Have a great weekend.

Thom