Work out email age in Power BI (Excluding weekend and holiday days)

Woodsa

New Member
Joined
Feb 26, 2021
Messages
12
Office Version
  1. 365
Platform
  1. Windows
I have three tables, Public Holidays which contain (Date, Holiday Binary (1 for each date that is a holiday date)), CalDates that contains (Date, WorkingDay_Mark (1 for working day, 0 for non working day)) and Deployment_Mailbox that contains (Date Received (Date the email was received))

I need to create a formula to show the age of an email from Deployment_Mailbox (Date Received) minus any weekend days and holiday days

Not sure if this would need to be Power Query M or DAX

I have got this far with it, this gives me the age minus weekends, but I can't work out how to also minus any holiday dates.

I created a SatSuns measure:
Power Query:
SatSuns = 
Countrows (Filter (
         CALENDAR(Min(Deployment_Mailbox[Date Received]),TODAY() ),WEEKDAY([Date],2) > 5)
                     )

Power Query:
CAL_AGE = 
DATEDIFF(
    MIN(Deployment_Mailbox[Date Received]),
    TODAY(),
    DAY
) - [SatSuns]
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,215,208
Messages
6,123,642
Members
449,111
Latest member
ghennedy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top