Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
OHM
Frequent Visitor

How to add a number of days (leadtime) to a date

I need a DAX formula to add a number of days (leadtime) to a date, returning a new date. The added days is piced from a variable, so it is not a fixed number.

The needed function will be like this

"Original Date" + "# of days" returns "New Date" 

1 ACCEPTED SOLUTION
Back2Basics
Helper IV
Helper IV

Hi OHM

 

I would suggest creating a seperate table with the category in one column and additional days in the other. Provided this category is also in the orignial dataset you can link between your current table and this new table, creating a relationship between the category in each table.

 

Then you should be able to create a new column in your original table along the lines of:

 

Leadtime Deadline = [Original Date] + table2[additional days]

 

 

Having the second table means that if any of the variable additional days change you can simply update that table rather than updating the query/calculation. Best of luck

View solution in original post

1 REPLY 1
Back2Basics
Helper IV
Helper IV

Hi OHM

 

I would suggest creating a seperate table with the category in one column and additional days in the other. Provided this category is also in the orignial dataset you can link between your current table and this new table, creating a relationship between the category in each table.

 

Then you should be able to create a new column in your original table along the lines of:

 

Leadtime Deadline = [Original Date] + table2[additional days]

 

 

Having the second table means that if any of the variable additional days change you can simply update that table rather than updating the query/calculation. Best of luck

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.