Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

Null Count

Hi Experts,

I am trying to calculate the Null values present in Value field. Here the nullcount under Value is 17.

Please provide the solution to calculate the Nullcount under value field apart from below two methods.

=Count( IF(ISNULL(Value) OR LEN(trim(Value))=0 OR Value=0,1))

=NullCount(Value)

  

IDValue
1-1301
2
3
47
5
663
7
877
9
10
11
12
13
14
15
1671
17
18
19
2032
21
2245
23
2438
25
2641

Thanks in advance

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

May use a NullAsValue and count on that Field. Like

NULLASVALUE Value;

SET NullValue = '<NoData>';

YourLoadStatement. Like

LOAD ID, Value

FROM yoursource;

Then use like

= Count({< Value = {'<NoData>'} >} ID )

View solution in original post

14 Replies
sunny_talwar

May be this

Sum(-Len(Trim(Value)) = 0)

sunny_talwar

My bad, this is the right syntax

=-Sum(Len(Trim(Value)) = 0)

Anil_Babu_Samineni

Or this?

=Count({<Value -= {"=Len(Value)>0"}>} Value)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

If Value is truly null, then this won't work.... but this can

=Count({<ID = {"=Len(Value) = 0"}>} Value)

sunny_talwar

Not working? Which one is not working?

bhavvibudagam
Creator II
Creator II
Author

=Count({<ID = {"=Len(Value) = 0"}>} Value)

This expression is not working getting 0 instead of 17

sunny_talwar

My bad, needed to count ID instead of value

=Count({<ID = {"=Len(Value) = 0"}>} ID)

Anonymous
Not applicable

Hi,

Try

=Count(if(IsNull(Value)or Value='',1))

Regards.

trdandamudi
Master II
Master II

One more way:

If you are sure the Value field is always a number then the following will work:

=Count(If(Not IsNum(Value),1))