Page 1 of 1

Totals: CountIf – ignoring null val

Posted: Tue Mar 25, 2014 8:10 am
by StepTK
Hello,

if we count the number of used values of a column in a DataBand, we want the cells that contain no value (null) does not count.

The formula
{CountIf (Data, SampleData.Al2O3 > 0)}
works, but 0 can also be an allowable value.

The ideal would be the formula with the condition "<> Null"
{CountIf (Data, SampleData.Al2O3 <> Null)}
but so returns no result.

Is there a solution?

Thanks!

Stephan

Re: Totals: CountIf – ignoring null val

Posted: Tue Mar 25, 2014 11:30 am
by Alex K.
Hello,

Please try to use the following expression:
{CountIf (Data, SampleData["Al2O3"] <> DBNull.Value)}

Thank you.

Re: Totals: CountIf – ignoring null val

Posted: Tue Apr 08, 2014 6:29 am
by StepTK
Thank you, this works depending on C#/VB using != or <>

Stephan

Re: Totals: CountIf – ignoring null val

Posted: Tue Apr 08, 2014 11:41 am
by HighAley
Hello, Stephan.

Yes, the expression depends on using language.

Thank you.