Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
kaygee28
Contributor III
Contributor III

Numbers In Charts are Not Corresponding

Good Day

I have two charts which do not have similar values in them, one chart determines the number of unique values within three sheets and the other calculates total sales within a period

here are the expressions

Chart that displays total unique values per gender

count(distinct{$<[Contact ID] = >}[Contact ID])

the expression to calculate total sales

Count(DISTINCT{$<[Year Purchased]={"*"}-{'Unknown'},[Month Purchased]={"*"}-{'Unknown'}>}[Contact ID])

they should both display the same number of records since each sale is a record on its own

the first expression pulls 113 records and the second expression pulls 139.

How do I fix this?

Thanks in advance.

4 Replies
Gysbert_Wassenaar

Check your data. Perhaps there are records where either Year Purchased or Month Purchased is null or Unknown.


talk is cheap, supply exceeds demand
kaygee28
Contributor III
Contributor III
Author

Hi Gysbert,

Yes I do have null values in month purchased and year purchased hence I excluded them in both my expressions.

Thanks in advance, but I reckon both expressions should correlate each other from the looks of things.

Hence I'll just look at my data again.

Gysbert_Wassenaar

You do exclude them in your second expression but not in your first. That's why they return different results.


talk is cheap, supply exceeds demand
kaygee28
Contributor III
Contributor III
Author

I'll have a look at the data and see, but it still doesn't make sense at the moment.

Thanks a lot for your help!!