Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
richardm90
Partner - Contributor III
Partner - Contributor III

Distinct Values

Hi Guys,

Im abit stuck on a KPI for Networking Days, I'm trying to display the number of records where the time taken from an appointment request being submitted to it being scheduled is within 2 working days, however I only want to do this for each referral ID once where the first appointment is scheduled i.e. each Referral ID could be linked to multiple appointments. Currently I have:

(Sum(Aggr(If(NetWorkDays([Submission date], "Date Scheduled", '25/12/2017','26/12/2017','01/01/2018','01/01/2018','30/03/2018','02/04/2018','07/05/2018','07/05/2018','28/05/2018','28/05/2018','27/08/2018','27/08/2018','25/12/2018','26/12/2018','01/01/2019','01/01/2019') <= 3, 1, 0),[Referral ID])))

How do I modify this to only include the first Referral ID record?

 

i.e. if I had

Referral ID         Date Submitted       Date Scheduled

------------------------------------------------------------------------

123                        10/02/2019               12/02/2019

123                        10/02/2019               17/02/2019

 

I would only want to include the first record.

 

Thanks in advance guys Smiley Happy

2 Replies
marcus_sommer

Maybe with:

Sum(Aggr(
   If(NetWorkDays([Submission date], firstsortedvalue("Date Scheduled", "Date Scheduled")) <= 3, 1, 0),
[Referral ID]))

- Marcus

richardm90
Partner - Contributor III
Partner - Contributor III
Author

That works perfectly, thank you very much! 🙂