Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

New Contributor

Count Distinct on Qlikview empty dimensional values?

Hi Community,

I'm currently working on a dashboard where I count the amount of customers I've given a call. For each call there are a number of dimensions which can be filled in (or not). When I load the data as flat file (where all dimensions are added in the fact) the count distinct on customer_id goes fine. However, as we are using a dimensional model loaded from FACT and DIMENSION tables I would like to keep my starmodel in Qlikview for readability and structure.

It works as follows: I have a VISIT table, with a PRODUCT_ID (which is nullable) and a CUSTOMER_ID, which is linked to PRODUCT on PRODUCT_ID. When I do a count(distinct(CUSTOMER_ID)) without putting PRODUCT_NAME (from the PRODUCT_TABLE), the count is fine. However when I add the PRODUCT_NAME it behaves strangely for my count. It counts customers without any PRODUCT_NAME as 1 for value "", which is as expected. However, when I have a customer with both a PRODUCT_NAME A and no PRODUCT_NAME it counts the customer as 1 for PRODUCT_NAME A and 0 for PRODUCT_NAME "".

I would expect it to be 1 for PRODUCT_NAME A and 1 for PRODUCT_NAME "".

What am I doing wrong here and how can I make my null value count correct as well?

Thanks and Regards,