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
joschultz
Helper III
Helper III

Need help with a formula

 

 

I have a matrix setup where I have columns for

 

Closed Date - Go Live Date - Weeks - Estimated Hours - 1/4/2016 - 1/11/2016 - 1/18/2016

 

 03/31/17           4/30/17         5                 80             

 

The close date and go live dates are data in a table.  I am calculating the weeks in a caluculated column from those other columns to get the number of weeks.  Estimated hours is also a data in the table.  I want to take the number of hours/ weeks to polulate in the matrix starting with the close data and popluating the number of weeks to the right.  So for instance I would like the number 16 to start popluating on week that 03/31/17 starts in.

 

Any ideas on how to do this?

 

Thank you,

 

Joseph

1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@joschultz

 

According to your description, you want to populate the hours/week from the "Closed Date" to "Go Live Date". Right?

 

In this scenario, you can just add a custom column with [Hours]/[Weeks]. Then add another column in Query Editor to generate list of dates between "Closed Date" and "Go Live Date".

 

= Table.AddColumn(#"Changed Type", "DatesInPeriod", each List.Dates([Closed Date],Duration.Days(Duration.From([Closed Date]-[Go Live Date])),#duration(1,0,0,0)))

 

 

After that expand the list of dates in your table, it will expant all dates into rows, and the [Hours]/[Weeks] result will be populated as well.

 

Regards,

View solution in original post

1 REPLY 1
v-sihou-msft
Employee
Employee

@joschultz

 

According to your description, you want to populate the hours/week from the "Closed Date" to "Go Live Date". Right?

 

In this scenario, you can just add a custom column with [Hours]/[Weeks]. Then add another column in Query Editor to generate list of dates between "Closed Date" and "Go Live Date".

 

= Table.AddColumn(#"Changed Type", "DatesInPeriod", each List.Dates([Closed Date],Duration.Days(Duration.From([Closed Date]-[Go Live Date])),#duration(1,0,0,0)))

 

 

After that expand the list of dates in your table, it will expant all dates into rows, and the [Hours]/[Weeks] result will be populated as well.

 

Regards,

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.