Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
sinanozdemir
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
Not applicable
Author

try
=Count(Null())

=Sum(Null())

sinanozdemir
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])

Not applicable
Author

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 ?

Not applicable
Author

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

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

Anonymous
Not applicable
Author

hi akintosh,

try as below:

In script:

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

In expression:

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

sinanozdemir
Specialist III
Specialist III

Please see my original answer.

Not applicable
Author

worked perfectly, thanks!

sinanozdemir
Specialist III
Specialist III

You are welcome.