Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vish123
Creator III
Creator III

count & count distinct function giving the same result on alphanumeric column

Hi Team,

I am facing strange thing in Qlik Sense where count & count distinct giving same results on a alphanumeric number column. Can you please suggest a solution. does anyone faced the similar case in your development ? 

Please let me know in case of more details.

 

Thanks

Vishnu

Labels (1)
6 Replies
Qlik_Eric_Thomas

Do you have a sample .QVF that demonstrates this issue? It's not impossible for Count and Count Distinct to show the same number if the underlying data matches that scenario.

Sr. Technical Support Engineer with Qlik Support
Help users find answers! Don't forget to mark a solution that worked for you!
MarcoWedel

Can you describe your expected results of the count function based on some sample data? 

vinieme12
Champion III
Champion III

You most likely have unique values in the field and table 

for example in a normalized employee table count(EmployeeID) and count(Distinct EmployeeID) will be same

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
vish123
Creator III
Creator III
Author

Hi Vineeth,

Thanks for your reply.

No the column does have duplicates in it. I have exported to data to excel and found this.

Even i have tried as below thinking that column might have trailing and leading spaces but did not work.

----> count( distinct trim(column))

Thanks

Vishnu

tresesco
MVP
MVP

Can you try to load the exported (to excel) data again in qlik and see if the behavior is same or not? If you still see the same issue, please try to share the excel here, so that we can give a try at our end.

vish123
Creator III
Creator III
Author

Hi All,

I have found the issue. I have to convert whole column to lower case which worked. Thanks all for your help.

Actually alphanumeric number has some capitals and lower letter in it which caused this issue but now it got resolved. 

Thanks

Vishnu