Forum Discussion

James_Galis1's avatar
James_Galis1
Helper II
3 years ago
Solved

Matching values between 2 tables when using a date slicer

Hello All
Hoping for some assistance on the following

I have 2 tables.

1, Employee 

2. Visits

 

The employee table is simply a list of all employees and the visit table contains all client visits attended by the employee's

 

What im trying to acheive is the following

 

When using the date slicer im hoping to show a list of employees from the employee table that have not had a visit within that date range.

Eg , I have for example an employee count of 200 on the employee table and if choose a date range  (24/4/23 - 30/4/23) from the visit table , i am hoping to see a list of employees that have visits in that date range and a list of employees that do not

 

The 2 tables have a relationship from a client ID.

 

Would appreciate the assistance

8 Replies

    • James_Galis1's avatar
      James_Galis1
      Helper II

      Apologies Ashish

      Here is a small sample size of data from 2 tables

       

       Visit table.

      Client IDVisit Start DateVisit Visit IDEmployee ID
      AC0008021862023-04-241516014AC001971161
      AC0036472892023-04-241609546AC003697811
      AC0008655242023-04-241591665AC003388602
      AC0000613902023-04-241609253AC000008651
      AC0016073532023-04-241442254AC001432971
      AC0015700542023-04-241582205AC000002261
      AC0010195082023-04-241541569AC001400185
      AC0008045862023-04-241540108AC000002251
      AC0025122242023-04-241612147AC003649687
      AC0007478542023-04-241611079AC000013024
      AC0013799822023-04-241610968AC000002293
      AC0008086032023-04-241442003AC001971080
      AC0000003982023-04-241520678AC002773931
      AC0010883332023-04-241443823AC003697811
      AC0000002222023-04-241441325AC000002279
      AC0008403092023-04-241578925AC001432971
      AC0030926212023-04-241449251AC001936818
      AC0009983092023-04-241508647AC000012964
      AC0022945272023-04-241447635AC000143289

       

      Employee table

      Employee IDHas VisitJob Title
      AC003697811YesCommunity Support Workers
      AC003649687YesCommunity Support Workers
      AC003388602YesCommunity Support Workers
      AC002773931YesCommunity Support Workers
      AC001971080YesCommunity Support Workers
      AC001971161YesCommunity Support Workers
      AC001936818YesCommunity Support Worker
      AC001432971YesCommunity Support Workers
      AC001400185YesCommunity Support Workers
      AC000143289YesCommunity Support Workers
      AC000012964YesCommunity Support Workers
      AC000013024YesCommunity Support Workers
      AC000008651YesCommunity Support Workers
      AC000002293YesCommunity Support Workers
      AC000002251YesCommunity Support Workers
      AC000002239NoCommunity Support Workers
      AC000002279YesCommunity Support Workers
      AC000002261YesCommunity Support Workers
      AC000002243NoCommunity Support Workers
      AC000002231NoCommunity Support Workers

       

      Note: The " Has Visit" column is entered manually and example of what i hope to acheive when slicing from the visit table.

      Obviously this would change when selecting the date range and depending on which empoyee has visit for the selected date range

       

      Please let me know if more information is required

       

      Thanks in advanced

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        Your data does not seem reepesentative.  You have taken only 1 date - please take more dates as well.  Also, within the date range selected, what is an employee visited on a certain date and not on another.  In such a scenario, since in the result, the employee ID should appear only once, what should the result be - Yes or No.  As requested, please share a logical/resresentative example and show the expected result on that revised sample.