Forum Discussion
EtienneB1
6 years agoRegular Visitor
Distribute work hours
Hello, I need to forecast work hours distributing the hour through the duration day. I will use an example to be more clear. I want to know how many hours per day I will need to work. How I cr...
- 6 years ago
Hi EtienneB1 ,
How about create a calculated table like so:
Crossjoin Table = SUMMARIZE ( FILTER ( ADDCOLUMNS ( CROSSJOIN ( CALENDARAUTO (), 'Table 1', 'Table 2' ), "enddate", [Start Date] + CALCULATE ( SUM ( 'Table 2'[Duration(days)] ) - 1, FILTER ( ALL ( 'Table 2' ), 'Table 2'[Process Name] <= EARLIER ( 'Table 2'[Process Name] ) ) ), "Hours", [Qty] * [Time per Unit(hours)] / [Duration(days)] ), VAR StartDate_ = [enddate] - [Duration(days)] + 1 RETURN [Date] <= [enddate] && [Date] >= StartDate_ ), [Date], [Id], [Process Name], [Hours] )For more details, please check the attached .pbix file.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey
6 years agoCommunity Support
Hi EtienneB1 ,
How about create a calculated table like so:
Crossjoin Table =
SUMMARIZE (
FILTER (
ADDCOLUMNS (
CROSSJOIN ( CALENDARAUTO (), 'Table 1', 'Table 2' ),
"enddate", [Start Date]
+ CALCULATE (
SUM ( 'Table 2'[Duration(days)] ) - 1,
FILTER (
ALL ( 'Table 2' ),
'Table 2'[Process Name] <= EARLIER ( 'Table 2'[Process Name] )
)
),
"Hours", [Qty] * [Time per Unit(hours)] / [Duration(days)]
),
VAR StartDate_ = [enddate] - [Duration(days)] + 1
RETURN
[Date] <= [enddate]
&& [Date] >= StartDate_
),
[Date],
[Id],
[Process Name],
[Hours]
)
For more details, please check the attached .pbix file.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- EtienneB16 years agoRegular Visitor
Thank you so much for your help.
One more thing, If I have IDs that has different workflow, What I mean that doesn't do all the processes maybe skip one or few.
How I can do it?