Forum Discussion
DAX Add Custom Column, Date Duration minus WeekEnds
- 6 years ago
Note that I have managed to find a solution from a previous post; NETWORKDAYS in PowerQuery Editor [Super User IV, Mariusz], from the downloaded example file; duration with no weekends and holidays.pbix
community.powerbi.com/t5/Power-Query/NETWORKDAYS-in-PowerQuery-Editor/td-p/940950
Hi, I have tried the suggestion from Employee..Microsoft, created new query, sample dates (as below), and resulting error message.
Note that my table calculated column that I am using that gives whole days is as below.
If I change the data type to decimal it just gives e.g. 10.0 My aim is to achieve days as e.g. 9.6
SLA Days = VAR Created =
MAX (Table[StartDate])
VAR Closed =
MAX (Table[EndDate])
RETURN
CALCULATE (
SUM ( 'Date'[IsWorkDay] ),
FILTER (
ALL ( 'Date'[Date] ),
'Date'[Date] >= [StartDate]
&& 'Date'[Date] <= [Created]
)
)
- PeteD13026 years agoHelper I
Hi Allan (Microsoft), Are you able to attach a sample scenario pbix file, so I can see where I am going wrong.
I followed your instrucions exactly, and cannot see why I am getting an error.
Thanks Peter- v-alq-msft6 years agoCommunity Support
- PeteD13026 years agoHelper I
Hi Alan (at Microsoft), Thanks for the sample file, that helped a lot, one step closer to a solution.
I have tested with 2 sets of date formatted data, one with Date [works OK], the other with Date/Time; this one has an error message.
I really need my result in part days, not whole days.
Do you have any suggestions.