Forum Discussion
prashantg364
2 years agoHelper II
DAX Query for working days
Hi All, I have a date table as shown in the table below. I want to calculate the total number of working days based on the date filtered by the user in visualization and restrict the maximum wo...
philadams
2 years agoFrequent Visitor
Do you have the option of amending the source for the date table? I implemented this in MySQL using the following in the view -
NOT(
WEEKDAY(dat.date) IN (5,6) OR hols.date IS NOT NULL
) AS 'Is Working Day','hols' is just a table containing dates for any holidays the buiness will be shut for. This way you can then simply sum this field for any filtered range on your date table.