Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have jobs table listed like below:
I have another table called driver log that looks like the below:
So in pivot above, how do I put a new measure called "Available Drivers".
So pivot should look like this:
Appreciate the help.
Regards,
Bryan
Solved! Go to Solution.
@Anonymous Use this measure to include zone as well in available driver calculation. If it does not work please share sample data to reproduce the scenario
Measure =
VAR _jobDate = MAX(Job[Job date time])
VAR _zone = SELECTEDVALUE(Job[zone])
RETURN CALCULATE(COUNT(DriverLog[Driver id]),FILTER(DriverLog,DriverLog[Login]<=_jobDate && DriverLog[Logout]>=_jobDate && DriverLog[zone]=_zone))
@Anonymous
please create a measure as per below
Measure =
VAR _jobDate = MAX(Job[Job date time])
RETURN CALCULATE(COUNT(DriverLog[Driver id]),FILTER(DriverLog,DriverLog[Login]<=_jobDate && DriverLog[Logout]>=_jobDate))
@Anonymous thanks so much, it seems to be working. Just 1 little issue I have.
Currently, in jobs table, there is a field called 'zone'. This field is used as a slicer in the report.
In driver log table, there is also a field called 'zone'
How to make the measure to also consider selected slicer in the report?
@Anonymous Use this measure to include zone as well in available driver calculation. If it does not work please share sample data to reproduce the scenario
Measure =
VAR _jobDate = MAX(Job[Job date time])
VAR _zone = SELECTEDVALUE(Job[zone])
RETURN CALCULATE(COUNT(DriverLog[Driver id]),FILTER(DriverLog,DriverLog[Login]<=_jobDate && DriverLog[Logout]>=_jobDate && DriverLog[zone]=_zone))
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 11 | |
| 9 | |
| 9 | |
| 8 |