Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have two databases one of supervisors and one of subordinates. I need to count the amount of times a supervisor and a subordinate have the same place, shift and Date.
What I have only considers if the conditions are true but doen't count them.
Table of Supervisors
SupDateShiftPlace
Rachel | 11/12/2023 | 0000 | NY |
Rachel | 11/13/2023 | 0000 | NY |
Rachel | 11/14/2023 | 0000 | NY |
Rachel | 11/15/2023 | 0000 | BT |
Rachel | 11/16/2023 | 1600 | NY |
Rachel | 11/17/2023 | 1600 | AT |
Rachel | 11/18/2023 | 0800 | BT |
Brown | 11/12/2023 | 0000 | AT |
Brown | 11/13/2023 | 0000 | AT |
Brown | 11/14/2023 | 0000 | AT |
Brown | 11/15/2023 | 0800 | NY |
Brown | 11/16/2023 | 0800 | BT |
Brown | 11/17/2023 | 0800 | BT |
Brown | 11/18/2023 | 0800 | NY |
Table of subordinates
SubDateShiftPlace
Taylor | 11/12/2023 | 0000 | NY |
Taylor | 11/13/2023 | 0000 | NY |
Taylor | 11/14/2023 | 0000 | NY |
Taylor | 11/15/2023 | 0000 | NY |
Thomas | 11/16/2023 | 1600 | NY |
Thomas | 11/17/2023 | 1600 | AT |
Thomas | 11/18/2023 | 1600 | BT |
Taylor | 11/12/2023 | 0000 | AT |
Taylor | 11/13/2023 | 0000 | AT |
Taylor | 11/14/2023 | 0000 | BT |
Thomas | 11/15/2023 | 0800 | NY |
Thomas | 11/16/2023 | 0800 | BT |
Thomas | 11/17/2023 | 0800 | BT |
Thomas | 11/18/2023 | 0800 | NY |
The correct answer would be
Rachel | Brown | |
Taylor | 3 | 2 |
Thomas | 1 | 4 |
What I have until now is:
Same =
IF (
CONTAINS (
Sup,
Sup[Date], MAX(Sub[Date]),
Sup[Shift], MAX(Sub[Shift]),
Sup[Place], MAX(Sub[Place])
),
0,
1
)
Please help
Solved! Go to Solution.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
87 | |
86 | |
68 | |
65 | |
63 |
User | Count |
---|---|
208 | |
120 | |
113 | |
79 | |
72 |