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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
IvanS
Helper V
Helper V

Split row into multiple rows based on nr. of active projects

Hello everyone,

 

I am working on project management report based on data from JIRA and I have received one request to split working time of "Ad-hoc" tasks partially (aliquotely) based on number of active projects running in time of creation of "Ad-hoc" task.

 

As it might be pretty difficult to understand, let's see example below:

 

1. Table FACT_Tasks contains list of all tasks. Ad-hoc tasks can be identified based on field "Description" when the cell contain string "Ad-hoc" or "Ad hoc".

Task IDTypeDescriptionCreated dateSpent timeProject ID
100TaskAd-hoc meeting week 214/01/202360(blank)
200IncidentUAT testing15/01/20233001111
300TaskDevelopment of app13/01/20236002222
400Task Ad-hoc meeting week 321/01/2023100(blank)

 

2. Table DIM_Projects containc list of all projects.

Project IDProject NameStatusRelease date
1000Project AReleased16.1.2023
1111Project BOn hold 
2000Project CNew 
2222Project DIn Progress 
3333Project EIn Analysis 

 

3. Now to split the working time of "Ad-hoc" tasks, we need to identify how many projects were active in time of task creation. In this example, on 14/01/2023 (Created date) there were 3 active projects. 
Following criteria apply:

a. Exclude projects with status: "On hold", "New" or "Canceled"

b. For projects with status "Released", take into consideration Release date. If Release date is on or after Created date, then project is counted as active in time of task creation. If Release date is before Created date, then project is not counted as active as the project got status Released already.

 

For task Ad-hoc meeting week 2: In time of creation of this task, there were 3 active projects (Projects A, D and E)

For task Ad-hoc meeting week 3: In time of creation of this task, there were 2 active projects (Projects D and E)

4. Expected result is below:

Task IDTypeDescriptionCreated dateSpent timeProject ID
100.1TaskAd-hoc meeting week 214/01/2023201000
100.2TaskAd-hoc meeting week 214/01/2023202222
100.3TaskAd-hoc meeting week 214/01/2023203333
200IncidentUAT testing15/01/20233001111
300TaskDevelopment of app13/01/20236002222
400.1Task Ad-hoc meeting week 321/01/2023502222
400.2TaskAd-hoc meeting week 321/01/2023503333

 

Any help is much appreciated!

Thank you

IvanS

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @IvanS 

 

You can use Power Query to get the expected result. Please download my attached pbix to see detailed steps. 

vjingzhang_1-1675149994611.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

1 REPLY 1
v-jingzhang
Community Support
Community Support

Hi @IvanS 

 

You can use Power Query to get the expected result. Please download my attached pbix to see detailed steps. 

vjingzhang_1-1675149994611.png

 

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

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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