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

Counting Distinct Cases with a Set Analysis of Counting differing fields less than or equal to

Hi,

Firstly thanks for all the great help and support in this group.

CaseIDWOWO_LIWorkDate
0113502199WO-00788684WL-0239473816.01.2020
0114682262WO-01172008WL-0239477514.01.2020
0114682262WO-01172008WL-0239477613.01.2020
0114704373WO-01180372WL-0232056706.01.2020
0114704373WO-01180372WL-0232056806.01.2020
0114755958WO-01197485WL-0237500615.01.2020
0114755958WO-01197485WL-0237500815.01.2020
0114757407WO-01198052WL-0240411819.01.2020
0114775610WO-01207778WL-0239478915.01.2020
0114825110WO-01229772WL-0241977322.01.2020
0114825110WO-01230882WL-0242694323.01.2020
0114825110WO-01230963WL-0242271823.01.2020
0114825110WO-01230963WL-0242641123.01.2020

 

Problem Domain

 

I have Cases with have 1 to many Work orders which in turn have 1 to Many Work Order Lines

There may be multiple engineer visits on a Work Order Line. The challenge is to count all Distinct Cases where there have been one or less days of work. 

The above data would thus resolve to 7 Distinct Cases and 5 of them where 1 or less work days are evident. So Case  0114682262 would not be counted as work took place over 2 days, the 13th and 14th but  0114704373 would be counted as all work was completed in one calendar day.

So how do I write an expression with Set Analysis to count distinct cases for 1 or less work days.

The solution will be used in a Straight Table and a Text field.

Many Thanks

 

Claire

1 Solution

Accepted Solutions
Highlighted

Re: Counting Distinct Cases with a Set Analysis of Counting differing fields less than or equal to

Try this

Count(DISTINCT {<CaseID = {"=Count(DISTINCT WorkDate) = 1"}>} CaseID)

View solution in original post

2 Replies
Highlighted

Re: Counting Distinct Cases with a Set Analysis of Counting differing fields less than or equal to

Try this

Count(DISTINCT {<CaseID = {"=Count(DISTINCT WorkDate) = 1"}>} CaseID)

View solution in original post

Highlighted
Contributor
Contributor

Re: Counting Distinct Cases with a Set Analysis of Counting differing fields less than or equal to

Thank you that worked perfectly. Hope you are safe and well in these challenging times.

 

Claire x