3 Replies Latest reply: Jul 13, 2012 3:40 PM by Jose Tos

# What is the difference between these expressions?

I have two expressions, one to count null values and one to count non-null values. However, they seem to be pulling the opposite thing...

count({\$<FeeOne={"*"}>}Shipments)  <<<Looks like it counts null values, based on my data set...

Count(if(IsNull(FeeOne),Shipments))         <<<Looks like it counts non-null values, based on my data set...

I am confused. Help?

• ###### Re: What is the difference between these expressions?

Hi,

count({\$<FeeOne={"*"}>}Shipments) is to count number of shipments has non null FeeOne

Count(if(IsNull(FeeOne),Shipments)) is to count number of shipments has null FeeOne

Nothing wrong in this.

Which version of Qlikview ur using?

Why you confused?Did you verified the data?

• ###### Re: What is the difference between these expressions?

Hi,

count({\$<FeeOne={"*"}>}Shipments)  -> "*" represents all include values , so in this, calculate the shipment based on all value in FeeOne

Count(if(IsNull(FeeOne),Shipments))   -> calculate the shipment,if feeone is null values.

you can use like this,

Count(If(Len(Trim(FeeOne)) > 0, ShipMent)

(or)

Count({<FeeOne -={'0'} >} ShipMent)

Check one FeeOne has values in your data set..

Example:

sum( {\$<Year = {“*”} – {2000}, Product = {“*bearing*”} >} Sales )
returns the sales for the current selection but with a new selection in “Year”: all years except 2000; and only for products containing the string ‘bearing’.

hope it helps..

• ###### Re: What is the difference between these expressions?

Use this to count  non null values:

count({<FeeOne -= {'*'}Shipments)

and this to count null values or count values that FeeOne is like *

count({<FeeOne = {'*'}Shipments)