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

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.

Reply
Jadreani
Frequent Visitor

Create a line for each day off from a start date and the duration of the days off

Dear friends,

 

can you please help me? I need to calculate the hours of absenteism per day. The data that I can get is the following:

 

NameTotal Days offStart date
A216.01.2023
A102.03.2023
B319.12.2022
B103.02.2023
C301.06.2023
C212.01.2023

 

The result expected is the following: One line for each day off that are only a workday (I already have a dimdate with a column "workday" = true or false))

 

Please find below the expected table: 

 

NameTotal Days offStart date
A116.01.2023
A117.01.2023
A102.03.2023
B119.12.2022
B120.12.2022
B121.12.2022
B103.02.2023
C101.06.2023
C102.06.2023
C105.06.2023
C112.01.2023
C113.01.2023

 

I would really appreciate your help 🙂

 

Kind regards,

5 REPLIES 5
Jadreani
Frequent Visitor

In order to create a visual per day and per team of the capacity. Thanks

Please read what I write some hours before. It is not a easy question and you have to think about your data model. Also "In order to create a visual per day and per team of the capacity" . You have to define capacity of the team. Perhaps you show us first your underlaying data structure with some examples (best case with the internal table function, i hate it to copy data from screenshots....)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Jadreani
Frequent Visitor

Hello, 

there is an additionnal colum to this table "Hours per day". The goal is to calculate the sum of hours of absenteism.

 

NameTotal Days offHoursStart date
A17.9016.01.2023
A17.9017.01.2023
A17.9002.03.2023
B17.9019.12.2022
B17.9020.12.2022
B17.9021.12.2022
B17.9003.02.2023
C17.9001.06.2023
C17.9002.06.2023
C17.9005.06.2023
C17.9012.01.2023
C17.9013.01.2023

Perfect, I had the right feeling. If you have a question next time, write directly the goal of the task and do not only describe your solution (additional a solution is great!). Sometimes your solution is the wrong way and ppl invest time to help and than we go in the wrong direction. 🙂

You have to think about a data model. You can than easy calculate sum of hours of absenteism.
Create a table for the date (dimensional table) with the flag of a working day. Be aware of if a person A B C have perhaps different working days? Are the dayoff hours different from person and days? 

If you share a good data example for the underlaying data someone can help you. You can upload to one drive, google drive, dropbox your excel and share here the link.

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




andhiii079845
Super User
Super User

I have the feeling that you have to tell us more where do you want to use this new table.

Perhaps it is only a "middle part" of a more complex question. Can you please tell us more about the reason for this new table? Thank you 🙂





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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