Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

How can i count empty/blank string values in a expression ?

Hello

How can i count empty/blank string values in a expression ?

1 Solution

Accepted Solutions
Highlighted
Specialist III
Specialist III

Maybe try something like this:

For empty/blank values = Count({<[Your Dimension Name] = {''}>} [Your Dimension Name])

For null values = Count({1 - <[Your Dimension Name] = {"*"}>} [Your Dimension Name])

View solution in original post

8 Replies
Highlighted
Not applicable

try
=Count(Null())

=Sum(Null())

Highlighted
Specialist III
Specialist III

Maybe try something like this:

For empty/blank values = Count({<[Your Dimension Name] = {''}>} [Your Dimension Name])

For null values = Count({1 - <[Your Dimension Name] = {"*"}>} [Your Dimension Name])

View solution in original post

Highlighted
Not applicable

that doesnt work

I have already the count of actual NULL value by using NullCount(ProductModel)


But, now i want to count the empty string fields inside ProductModel , how can i do that ?

Highlighted
Not applicable

= Count({<[ProductModel] = {''}>} [ProductModel])

= Sum( {$<ProductModel = {''}>} ProductModel )

Highlighted
Master
Master

hi akintosh,

try as below:

In script:

load *,
if(LEN(TRIM(FieldName)) = 0,'1','0') Flag
From ......;

In expression:

count({< Flag = {1}>}FieldName)

Highlighted
Specialist III
Specialist III

Please see my original answer.

Highlighted
Not applicable

worked perfectly, thanks!

Highlighted
Specialist III
Specialist III

You are welcome.