Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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 ?

Labels (1)
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.