Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Help! - distinct keyword not working like i thought

I have a measure calculation..

Count(distinct {$

<BINFlagToday={1}>}

BIN)

my data looks like this

BIN    BINFlagToday      Emp       EmpFlagToday

123     1                           John       1

123     1                            Tom        1

123     1                           Jerry        1

this means that I have 3 employees in one position today at this moment.  I thought that the above measure would return 1, but it's returning 3 (I think).  how can I return only 1?

7 Replies
swuehl
MVP
MVP

Are you sure it's returning 3 or not?

Could you post a small sample QVW?

Not applicable
Author

Hi,

I have used the same above data in Qlikview , i am getting count as 1.Can you please check once.

Please refer the attachment.

Capture.PNG

swuehl
MVP
MVP

1 is correct, isn't it?

If your real application shows something different, I strongly assume that this is due to differences in your data / model.

Not applicable
Author

yes, 1 is correct.

Anonymous
Not applicable
Author

I will have to analyze it a little further..  my data is more complex, so I must be missing something..

Anonymous
Not applicable
Author

Thanks for the input.  it is returning what it should be.  the original excel file was incorrect in its calculation (I was using that as my original starting point).  we're going from an excel version to a qlik version.  the excel version was incorrect.

Thanks,

Maria

Anil_Babu_Samineni

Seems, Qliksense Frustrate on you

Can you try this for me?

Count({<BINFlagToday = {'1'}>} DISTINCT BIN)


22e44748ecfd4851b46002d6c5078ea3.png

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful