Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Count is giving the distinct value of an expression without using distinct qualifier

Hi Guys 

I have 2 tables Table1 and Table2 both linked based on ID column.

 In Table1 ID column has an unique value and in Table2 ID do not have unique values.

Now i have created a straight table with 

Dimensions as Branch (from Table1), Reason (Table2) 

Expression as Count(ID)

But the problem is above expression is giving me distinct ID

and when i changed my expression to Count(aggr(NODISTINCT Count(ID),Branch,Reason)). I am getting the correct result 

or  Remove branch as dimension and keep expression as count(ID) the also I am getting the correct result.

 

Can any one tell me the reason for this kind of behaviour?

 

4 Replies
Highlighted
Creator III
Creator III

Re: Count is giving the distinct value of an expression without using distinct quali...

Hi Manish
Can you share sample data set
Highlighted

Re: Count is giving the distinct value of an expression without using distinct qualifier

May be look here Count or Count distinct? 

Highlighted
Digital Support
Digital Support

Re: Count is giving the distinct value of an expression without using distinct qualifier

Manish, did Sunny's link to the Design Blog post help?  Here are a couple of others that may be related as well:

https://community.qlik.com/t5/Qlik-Design-Blog/The-nodistinct-qualifier-and-the-Aggr-function/ba-p/1...

Here is the base URL to the Design Blog where you can search on your own as well:

https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog

If Sunny's post did help, be sure to use the Accept as Solution button on his post to give him credit for the help.  If the above does not work, I am not sure I can come up with anything further, but hopefully it will potentially fill in any remaining gaps.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Highlighted
Partner
Partner

Re: Count is giving the distinct value of an expression without using distinct qualifier

Sorry but I couldn't simulate the issue here:

I'm getting the full count of ID without distinct qualifier:

MC.PNG

Is there anything I missed out?

My mock data looks like this:

Raw:
load * inline [
Branch,ID
abc,123
def,456
ghi,789
];

Raw2:
load
Reason,ID inline [
Reason,ID
aaa,123
bbb,123
ccc,456
ccc1,456
ddd,789
ddd1,789
];