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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
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
Partner - Specialist
Partner - Specialist

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

Nemo1
Creator II
Creator II
Author

it counts 0, when i should get a number instead

Clement15
Partner - Specialist
Partner - Specialist

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