cancel
Showing results for
Did you mean:
Frequent Visitor

## ADD or MINUS NUMBER OF WORKING DAYS FROM A DATE

Hi guys,

I am new to Power Bi, hoping someone will be able to assist me. I am trying to add (and remove- in another report) a number of working days from a date. I have a date table already and a workday column. Below is logic in excel, trying to convert this into DAX:

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support

Hi @Mugisha ,

Please refer to my .pbix file.

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.

5 REPLIES 5
Super User IV

@Mugisha , refer this

Travelling Across Workdays - Decoding Date and Calendar 4-5 - Power BI Turning 5 Celebration Series
https://community.powerbi.com/t5/Community-Blog/Travelling-Across-Workdays-Decoding-Date-and-Calenda...

Proud to be a Super User!

Super User IV

@Mugisha - See if this helps, it was written as a replacement for Excel NETWORKDAYS: https://community.powerbi.com/t5/Quick-Measures-Gallery/Net-Work-Days/td-p/367362

Also, see this more general Excel to DAX Translation page: https://community.powerbi.com/t5/Community-Blog/Excel-to-DAX-Translation/ba-p/1060991

---------------------------------------

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

Community Support

Hi @Mugisha ,

Why are the start date and end date in the NETWORKDAYS function the same?

You may meed to create a measure like this.

``````Measure =
IFERROR(
SWITCH(
TRUE(),
MAX([Expiry Indicator]) = "No Expiry Date", BLANK(),
DATEDIFF( ) = 0, DATEADD(Sheet5[Tenancy Expiry Date], -20, DAY),
DATEDIFF( ) = 1, DATEADD(Sheet5[Tenancy Expiry Date], -19, DAY)
),
"Check"
)``````

Please give a sample data of the table if you cant get the correct result and explain your calculation logic again.

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.

Community Support

Hi @Mugisha ,

Please refer to my .pbix file.

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.

Frequent Visitor

😁 Thank you!!!!!!

Announcements

#### Power Platform Community Conference

Check out the on demand sessions that are available now!

#### Power Platform October Community Highlights

Check out the top community contributors across all of the communities

#### Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors