Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I've got an MSSQL table [incidents] with a datetime field, and a mysql table [schedule] which contains all employee shifts worked with start (datetime) and end (datetime) fields.
I'm trying to build a dashboard to list incomplete incident reports. When an incident is clicked on I'd like to list everyone who was working during the incident.
Can this be done within Power BI?
Solved! Go to Solution.
You may drag measure below to Table2. It takes advantage of Show Categories With No Data.
Measure = VAR dt = SELECTEDVALUE ( Table1[dt] ) VAR st = SELECTEDVALUE ( Table2[st] ) VAR et = SELECTEDVALUE ( Table2[et] ) RETURN IF ( st <= dt && dt <= et, 1 )
You may drag measure below to Table2. It takes advantage of Show Categories With No Data.
Measure = VAR dt = SELECTEDVALUE ( Table1[dt] ) VAR st = SELECTEDVALUE ( Table2[st] ) VAR et = SELECTEDVALUE ( Table2[et] ) RETURN IF ( st <= dt && dt <= et, 1 )
Thanks! That worked great.
a little confused about this part of the code. Wouldn't those 2 variables always be NULL?
VAR st = SELECTEDVALUE ( Table2[st] ) VAR et = SELECTEDVALUE ( Table2[et] )
User | Count |
---|---|
70 | |
70 | |
34 | |
23 | |
22 |
User | Count |
---|---|
96 | |
94 | |
50 | |
42 | |
40 |