Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I need to convert the following sample of Activity ID with Start Date and Finish Date and Cost / Activity
I can calculate and get Activity Duration and Cost Per Activity Per day
Then I need to convert this shape to New table with Activity ID and Date in days and Cost / activity / date
to this shape
To visualize the data as Cost and date S-Curve Primavera P6
Kindly share with me any paper related to this.
Solved! Go to Solution.
Hi @Khalil87
please try
NewTable =
SELECTCOLUMNS (
GENERATE ( 'Table', CALENDAR ( 'Table'[Start Date], 'Table'[Finsh Date] ) ),
"Activity ID", 'Table'[Activity ID],
"Date", [Date],
"Cost/Day", 'Table'[Cost/Day]
)
thank you @tamerj1 It worked perfectly
just asking for one more tip, how to consider Off-days and holidays on the calender to get zero cost on off-days, and distributr the cost on the remaining days,
Thanks in advance
@Khalil87
Please try
NewTable =
SELECTCOLUMNS (
GENERATE (
'Table',
FILTER (
CALENDAR ( 'Table'[Start Date], 'Table'[Finsh Date] ),
NOT ( WEEKDAY ( [Date], 2 ) IN { 6, 7 } )
)
),
"Activity ID", 'Table'[Activity ID],
"Date", [Date],
"Cost/Day", 'Table'[Cost/Day]
)
The calnder sheet worked fine, but the total is not correct,
I discovered that the cost/day calculated from the total duration of finish - start, without considering week ends,
so how to calculate Date Diff, of only work days?
Thank you
@Khalil87
Sorry, I got engaged with other subjects. Please create a new calculated in column in the original table.
Cost/Day Correct =
DIVIDE (
'Table'[Cost/Duration],
COUNTROWS (
FILTER (
CALENDAR ( 'Table'[Start Date], 'Table'[Finsh Date] ),
NOT ( WEEKDAY ( [Date], 2 ) IN { 6, 7 } )
)
)
)
Then the new table would be
NewTable =
SELECTCOLUMNS (
GENERATE (
'Table',
FILTER (
CALENDAR ( 'Table'[Start Date], 'Table'[Finsh Date] ),
NOT ( WEEKDAY ( [Date], 2 ) IN { 6, 7 } )
)
),
"Activity ID", 'Table'[Activity ID],
"Date", [Date],
"Cost/Day", 'Table'[Cost/Day Correct]
)
Thank you for your time,
I think it's better to recalculate the Duration in correct way first then I can get the correct cost/day
But the dates is based on calender with Friday Off, and Holidays, so could you help me how can I control the calender generation table with Friday-Off and Table of Holidays.
FILTER (
CALENDAR ( 'Table'[Start Date], 'Table'[Finsh Date] ),
WEEKDAY ( [Date], 2 ) <> 5
&& NOT ( [Date] IN VALUES ( 'Holidays'[Date] ) )
)
Hi @Khalil87
please try
NewTable =
SELECTCOLUMNS (
GENERATE ( 'Table', CALENDAR ( 'Table'[Start Date], 'Table'[Finsh Date] ) ),
"Activity ID", 'Table'[Activity ID],
"Date", [Date],
"Cost/Day", 'Table'[Cost/Day]
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
20 | |
18 | |
16 | |
13 | |
10 |