Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Ruud_Hogenboom
Contributor II
Contributor II

counting "-" value

Hi All,

To see which kind of airco is used i have to count 3 specific values in 3 different fields. The values in these fields only contain "TRUE" or "-". If no airco is used then the value should be "-" in all 3 fields, like shown below

Ruud_Hogenboom_1-1631004903156.png

 

Somehow i can't make Qlik to count all the instances when this is the case.

I'm using this formula which doesn't seem to work:

=count({<[OP_530 - AIR CONDITIONING] = {'-'}, [OP_534 - AUTOMATIC AIR CONDITIONING] = {'-'}, [OP_8R9 - REFRIGERANT] = {'-'}>} CTY)

Instead of the '-' i also tried null, '0' and ' '  

What am i doing wrong?

Kind regards,

Ruud Hogenboom

 

1 Solution

Accepted Solutions
vikasmahajan

yes while loading data load data with following command

If(len(trim(OP_530 - AIR CONDITIONING))= 0 or OP_530 - AIR CONDITIONING='NULL' or OP_530 - AIR CONDITIONING='-', 'NULLAC', OP_530 - AIR CONDITIONING) as OP_530 - AIR CONDITIONING

use NULLAC in set analysis to count null AC directly you can not count null

 

Thanks

vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.

View solution in original post

2 Replies
vikasmahajan

yes while loading data load data with following command

If(len(trim(OP_530 - AIR CONDITIONING))= 0 or OP_530 - AIR CONDITIONING='NULL' or OP_530 - AIR CONDITIONING='-', 'NULLAC', OP_530 - AIR CONDITIONING) as OP_530 - AIR CONDITIONING

use NULLAC in set analysis to count null AC directly you can not count null

 

Thanks

vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
stevejoyce
Specialist II
Specialist II

=count({<[OP_530 - AIR CONDITIONING] = {"=len([OP_530 - AIR CONDITIONING] )=0"}, [OP_534 - AUTOMATIC AIR CONDITIONING] = {"=len([OP_534 - AUTOMATIC AIR CONDITIONING] )=0"}, [OP_8R9 - REFRIGERANT] = {"=len([OP_8R9 - REFRIGERANT] )=0"}>} CTY)