Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Nemo1
Creator II
Creator II

Count the quantity of "-"

Hello everyone,

I am trying to count the number of "-" from a dimension.. 

for some reasons it is not working out.. 

 

this is the formula: Count({<Vendor = {'-'}>} Vendor)

thanks

5 Replies
Clement15
Creator III
Creator III

Hello, this should work
Count({<Vendor = {''}>} Vendor)

Nemo1
Creator II
Creator II
Author

it counts 0, when i should get a number instead

Clement15
Creator III
Creator III

When you write '-' does it represent a null value?

Nemo1
Creator II
Creator II
Author

yes, it does 🙂

marcus_sommer

NULL means there is nothing - it's not a stored value and could be therefore not accessed or calculated. A quite simple and very common approach in such use-cases is to replace NULL with a real value in the script, maybe like:

if(len(trim(Vendor)), Vendor, 'no Vendor') as Vendor