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: 
Not applicable

Issue with Counting Distinct

Hello,

I am trying to count distinct 'Call: Call ID' using set analysis. I have include the script I am using below. However, when I use this method, I am missing about 30 records from the data set. I have confirmed that there should be 241 records returned but I am only getting 210. Is there something wrong with my script? Any other suggestions as I am stuck...

Thanks.

Count(distinct{$<[Liason Type]-={'FME','AML'},[Product: Description]={'Apples'},Objective-={'Presentations'}>} [Call: Call ID])

Labels (1)
27 Replies
sunny_talwar

Can you share the filtered Excel file where you have 239 rows of data?

Not applicable
Author

I have attached the filtered content

sunny_talwar

I don't think the file show any filtration my friend. Its still showing all the rows.

Not applicable
Author

Sorry about that. When I uploaded the files the filters were removed.

Not applicable
Author

I can not get the filters to stay without deleting all the data. Therefore, I filter on the following:

1. Date of Aug 2016

2. Liaison Type = MSL

3. Product: Description = Apples

4. Objective = Scientific Interaction and Scientific Meeting

5. Interaction Type = Face to Face and Phone

sunny_talwar

Then why don't you try this:

Count(DISTINCT{$<[Liason Type] = {'MSL'}, [Product: Description] = {'Apples'}, Objective = {'Scientific Interaction', 'Scientific Meeting'}, [Interaction Type] = {'Face to Face', 'Phone'}>} [Call: Call ID])

Does this give you the right number? 238?

Not applicable
Author

Thanks for the response. Unfortunately, not this still gives me a result of 210.

sunny_talwar

I got 238 using this expression and making a selection on Aug 2016

Capture.PNG

Script

Table:

LOAD

    "Call: Call ID",

    "Parent Call",

    Attendees,

    "Account ID",

    State,

    Datetime,

    MonthName(Datetime) as MonthYear,

    "Interaction Type",

    "Time Spent",

    Objective,

    "Product: Description",

    "Liaison Type",

    Status

FROM [lib://Lib/Deidentified Interactions Sample Aug Filter.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

Expression:

Count(DISTINCT{$<

[Liaison Type] = {'MSL'},

[Product: Description] = {'Apples'},

Objective = {'Scientific Interaction', 'Scientific Meeting'},

[Interaction Type] = {'Face to Face', 'Phone'}>} [Call: Call ID])