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.
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 |
Jeff | Store 1 |
Donnie | Store 1 |
Steve | Store 3 |
'Timecard'
Name | Location | Date |
Jeff | Store 1 | 1/29/2021 |
Donnie | Store 1 | 1/29/2021 |
Steve | Store 3 | 1/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
Solved! Go to Solution.
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.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
32 | |
30 | |
18 | |
18 |