Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
keylian031987
Regular Visitor

Scheduling Conflict Report

Hi
I created a form with Powerapps to collect all 2022 vacations from my division (58 employees). In the form I collect: Employee ID, Employee Name, Employee Backup, Start Date, End Date and Area. One employee can have multiple entries in the year (there are 22 vacations days so days can be distributed through the year). I need to create a report to identify conflict between employees and their backup and I am blocked. Don't know how to do it. 

1 ACCEPTED SOLUTION

Hi @keylian031987 

 

I create a matrix visual as below to show which employees are on which vacation dates. Is this able to meet your need? For example, on 2021/12/23, Employee 2, 3, 4, 5 were on vacation. Employee 1 doesn't have any vacation dates so he is on the row where Vacation Days is blank. 

vjingzhang_1-1652858281790.png

 

To display all dates, the original start dates and end dates are not enough. I use Power Query Editor to perform the following steps to generate all vacation dates for all employees. 

 

a. Add a custom column "Vacation Days" to have a list of all dates between [Start Date] and [End Date].

 

try List.Dates([Start Date], Duration.Days([End Date] - [Start Date]) + 1, #duration(1,0,0,0)) otherwise null

 

vjingzhang_0-1652858711378.png

 

b. Expand "Vacation Days" column to New Rows. Change this column to Date type. Then apply this change to Power BI Desktop.  

vjingzhang_1-1652858867755.png

 

Now you have a table similar to below. 

vjingzhang_2-1652859048491.png

 

Select a matrix visual, put "Employee" on Columns, "Vacation Days" on Rows. Put Employee on Values and select Count aggregation for it. You will have a matrix as shown in the first image. 

vjingzhang_3-1652859221280.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

5 REPLIES 5
keylian031987
Regular Visitor

I have this table with Employee, Area, Start Date of Vacation and End Date of Vacation. If you notice Employee 2 and Employee 3 have days that are equal and for me those days are conflict because EMployee 2 is the backup of Employee 3. I need a formula to identify that. Which days are equal between employees.

 

 

 

Employee         Area    Start Date         End Date

Employee 1RFC  
Employee 2RFC4/11/20224/14/2022
Employee 2RFC7/26/20227/29/2022
Employee 2RFC12/23/20221/9/2022
Employee 3RFC7/25/20228/2/2022
Employee 3RFC12/19/20221/4/2022
Employee 4RFC7/25/20228/2/2022
Employee 4RFC12/23/20221/9/2022
Employee 5RFC12/21/20221/5/2022
Employee 5RFC6/13/20226/17/2022
Employee 5RFC7/26/20227/29/2022
Employee 6RFC11/14/202211/29/2022
Employee 7RFC10/31/202211/14/2022
Employee 7RFC4/11/20224/18/2022

Hi @keylian031987 

 

Here is my sample file for your reference. 

 

Jing

Hi @keylian031987 

 

I create a matrix visual as below to show which employees are on which vacation dates. Is this able to meet your need? For example, on 2021/12/23, Employee 2, 3, 4, 5 were on vacation. Employee 1 doesn't have any vacation dates so he is on the row where Vacation Days is blank. 

vjingzhang_1-1652858281790.png

 

To display all dates, the original start dates and end dates are not enough. I use Power Query Editor to perform the following steps to generate all vacation dates for all employees. 

 

a. Add a custom column "Vacation Days" to have a list of all dates between [Start Date] and [End Date].

 

try List.Dates([Start Date], Duration.Days([End Date] - [Start Date]) + 1, #duration(1,0,0,0)) otherwise null

 

vjingzhang_0-1652858711378.png

 

b. Expand "Vacation Days" column to New Rows. Change this column to Date type. Then apply this change to Power BI Desktop.  

vjingzhang_1-1652858867755.png

 

Now you have a table similar to below. 

vjingzhang_2-1652859048491.png

 

Select a matrix visual, put "Employee" on Columns, "Vacation Days" on Rows. Put Employee on Values and select Count aggregation for it. You will have a matrix as shown in the first image. 

vjingzhang_3-1652859221280.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Thanks a lot!

ribisht17
Super User
Super User

@keylian031987 

 

Not enough explanation and data

 

Regards,

Ritesh

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.