Forum Discussion
Calculating working days
- 5 years ago
v-robertq-msft , I think I've found it!
The date table and workingday column are the samen, but the working days delta has become the following:
as you can see, the one delayed shipment in the overview now gets a positive number. I should be able to use this to measure delayed shipments within a tolerance finally get the performance based on working days! :):):)
Hi, Anonymous
According to your description of your sample data, I created another two rows of data and transformed the DAX formula to remove the blank value:
Workdays Count =
IF(
[Start Date]<=[End Date],
CALCULATE(SUM('Date'[Isworkday]),FILTER(ALL('Date'),'Date'[Date]>=EARLIER('Fact table'[Start Date])&&'Date'[Date]<=EARLIER('Fact table'[End Date]))),
CALCULATE(SUM('Date'[Isworkday]),FILTER(ALL('Date'),'Date'[Date]<=EARLIER('Fact table'[Start Date])&&'Date'[Date]>=EARLIER('Fact table'[End Date]))))
And you can get the expected output:
You can download my test pbix file below
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.