Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BlueTech
Frequent Visitor

List Names that are NOT found on Dynamic Table

So I've found a few examples that are close, but have been unable to get this to work exactly as I need it to.  What I have is a timesheet application that feeds daily punches to BI.  

 

I have two tables 'Timecard' and 'Team'.  The table 'Team' has roughly 500 names on it, and I need to callout ONLY the names on that list that have not punched in for the day.  These punches are referenced from the 'Timecard' table (with several thousand records).

 

'Team'

Name Location
JeffStore 1
DonnieStore 1
SteveStore 3

 

'Timecard'

Name LocationDate
JeffStore 11/29/2021
DonnieStore 11/29/2021
SteveStore 31/28/2021

 

Desired result:

Steve - Store 3 (as he is the only one from that did not punch today)

 

I also have a geographic slicer, that breaks down the various markets though 'Location', where I have a relationship between 'Timecard' and 'Team' already.  Currently all of this works well to show and filter the completed punches, but looking to see the non-punches for compliance.

 

How would I list the names not found, and still keep the geographic and date slicers working?

 

Thanks

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

1. create a list of all users:  var a= VALUES(Team[Name])

2. select all users that have punched today   var b= calculate(values(Timecard[Name]),Timecard[Date]=TODAY())

3. Use EXCEPT to find the fallout  var c = EXCEPT(a,b)

 

This is now a single row table with all users that haven't punched yet.  Decide what to do with this table - use CONCATENATEX() to return it as a string, or use it as a filter elsewhere.

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

1. create a list of all users:  var a= VALUES(Team[Name])

2. select all users that have punched today   var b= calculate(values(Timecard[Name]),Timecard[Date]=TODAY())

3. Use EXCEPT to find the fallout  var c = EXCEPT(a,b)

 

This is now a single row table with all users that haven't punched yet.  Decide what to do with this table - use CONCATENATEX() to return it as a string, or use it as a filter elsewhere.

This worked great.  Took me a couple tries to get it completely right, as it was a bit unclear where these would be placed.  Created tables with single columns, with the 'not completed' being the thrid and final, producing the list as needed.

 

Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors