Forum Discussion
AllG
5 years agoFrequent Visitor
Dynamic expected working hours and cost
Need help to calculate dynamic expected working hours and cost for the year, based on date selection and details as below: Tables Emp Data – general info about employees (ID, Manager, Leader, BU e...
v-lionel-msft
5 years agoCommunity Support
Hi AllG ,
", but not able exclude Weekend (Sat and Sun). any help will be highly apprecieated."
Please refer to the formula.
Measure =
CALCULATE(
DATEDIFF( [.Start Date Check], [.End Date Check], DAY ),
FILTER(
'Emp Data',
NOT( WEEKDAY([.Start Date Check]) in {6,7} ) && NOT(WEEKDAY([.End Date Check]) in {6,7} )
)
)
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AllG
5 years agoFrequent Visitor
Hi Lionel,
Thanks for your reply.
I am looking for dynamic calculation of workdays, based on start date from "Emp Data" table and end date from slicer selection. And I am not getting correct results with above calculate measue, for example, January workdays showing as 30 and group by or summarize results are blank.