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.
I have an assignment table where each record includes an assignment start date, assignment end date and an employee ID. Each assignment is associated with one employee. Basically, I want to create a line chart which displays the count of employees not on assignments for each week, based on the week during which each employee ends their current assignment. Basically if an employee has an assignment end date next week, they would be included in the count for next week and all subsequent weeks. This will be a future forecast calendar and there will be no assignments starting after the end of the current assignment. How would this be done?
Alright, here's how it's done ...
=COUNTROWS( FILTER( AssignmentsTable, // if you're looking at Mar-16 then this will show all assignments starting before or on 3/1/16 AssignmentTable[StartDate] <= MIN(Calendar[Date]) &&
// if you're looking at Mar-16 then this will include all assignments ending after 3/31/16 AssignmentTable[EndDate] > MAX(Calendar[Date])
)
)
You may have to play around with signs (<, >, <=, >=) and the MIN/MAX but this is the basic idea. You definitely need a calendar table for this.
Hi @Anonymous,
Could you post some sample data with your expected result in this case?
Regards
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |