Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Normally my expressions of "Count(Distinct FieldName)" come out correctly, but I am running into a chart where I have a discrepancy.
My "Distinct" count shows me a count of 10,149 FieldName's but if I turn it from a bar chart into a general chart and export to Excel, then take that FieldName column's data and "Remove Duplicates" (which is what the "Distinct" function should do right?) I get 849 results remaining.
So why would the Count(Distinct FieldName) not be returning that 849 value if there are proven to be only 849 distinct FieldName values?
I have gone back in several times with several reloads, all with the same results.
I think I found the answer - I had 2 charts - 1 as a bar and 1 as a general. The general chart had another field in there and I found that the field was null for some entries, so the general chart did not have all the line items for me to compare.
The bar chart with only the 1 dimension and 1 expression was correct after all. My general chart was missing information since QV ignored the nulls.
Thanks for the pointers.
Do you have a dimension in this chart? Distinct usually gives a distinct count per dimension. So, if something repeats in two dimensions, it will be counted 1 for both the dimension value. For example
Country, City
India, Dehi
USA, Delhi
Although the distinct count of City is 1, but it will be counted 1 for India and 1 for USA... making it 2
Agree with Sunny. There might be another dimensions associated with 'FieldName' column which is making it duplicate.
I think I found the answer - I had 2 charts - 1 as a bar and 1 as a general. The general chart had another field in there and I found that the field was null for some entries, so the general chart did not have all the line items for me to compare.
The bar chart with only the 1 dimension and 1 expression was correct after all. My general chart was missing information since QV ignored the nulls.
Thanks for the pointers.
Hi Sunny,
I'm new to Qlik and I have this issue. What's the suggested process so that Dlehi will only be counted as 1?