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 a table called "SR Data" which is a list of every scheduled "service request" that has a start date/time and an end date/time.
Users are schedule 8 hours a day. Either two visits: one 4 hour in the morning and one 4 hours in the afternoon, or one 8 hour visit.
I'm trying to show user availability by day. I tried:
IF(SUM(SR Duration) <8, "Avail", "Booked") but it doesn't seem like I'm getting what I need.
Also, I'd ideally like to show if the scheduled SR and the availability are for AM, PM, or All day.
Solved! Go to Solution.
I notice that you already have a date column in your table. You can create a column to calculate the time difference between StartDate and EndDate.
Duration = DATEDIFF(Table[StartDate], Table[EndDate], HOUR)
Then you need to calculate the duraion group on day and contact and use it in IF() condition.
Availability = IF(CALCULATE(SUM(Table[Duration]),ALLEXCEPT(Table,Table[Date],Table[Contact]))<8,"Avail","Booked")
Regards,
Can you post some sample data and your current results versus what results you would like?
@Greg_Deckler I was able to create a column that tells me if a scheduled request fills the "AM", "PM", or "ALL DAY" slot. Now my problem is: now every user has a scheduled request on each day. So, I need to find a way to show ALL dates, not just those with scheduled requests.
I have the scheduled request date and my date table as a relationship. The user and the start date of the request show up, but not the generic date from the date table. Is this a problem with my relationship or do I need to write a measure to say something like
"If no scheduled request on a date, show date anyway"?
I notice that you already have a date column in your table. You can create a column to calculate the time difference between StartDate and EndDate.
Duration = DATEDIFF(Table[StartDate], Table[EndDate], HOUR)
Then you need to calculate the duraion group on day and contact and use it in IF() condition.
Availability = IF(CALCULATE(SUM(Table[Duration]),ALLEXCEPT(Table,Table[Date],Table[Contact]))<8,"Avail","Booked")
Regards,
So I have a list of scheduled SRs but I can't figure out a way to show every single date but with a "0" for duration on dates that don't have a scheduled SR.
So, if no SR is schedule on a date, show 0.
Also, needs to be for each User.
"If User does not have SR scheduled on this date, show a 0 for scheduled duration (time)"
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 |
---|---|
108 | |
106 | |
87 | |
77 | |
69 |
User | Count |
---|---|
124 | |
112 | |
94 | |
84 | |
75 |