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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Add a number of days from a column to a date in a new column

Hi 

Sorry but i am new here and just getting started with BI. I need to add the number of Forward Days to Today's date to give me a new column. ie 28/06/2022 + (for branch 1) 11 days = 09-07-2022 (sorry uk date format)

Branch 50 would be 28/06/2022 + 12 days = 10-07-2022 

I have tried DATEADD but that needs a set numeric and TODAY + again needs a single number

Please help.

Mike_Pitcher_0-1656418784088.png

Thanks

 

2 ACCEPTED SOLUTIONS
selimovd
Super User
Super User

Hey @Anonymous ,

 

the start is always difficult. That's the reason we have here a community that helps.

You can create a new measure that is adding the days to today's date:

Added Days = TODAY () + MAX ( myTable[Forward Days] )

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

Best regards
Denis

Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic

View solution in original post

Hey @Anonymous ,

 

MAX is giving you the maximum amount of days in this filter context. You need that because in a DAX measure you always need an an aggregation. So for each row it will anyway just return the only number existing.

 

But I'm happy it solved your issue. If you have any question let me know.

 

By the way, in this community always mark people with an "@" and the name of the person . Otherwise I will not get notified that you replied and you will not get an answer 😉

 

Best regards

Denis

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @selimovd 

 

Some more help please, I am having trouble with my table link, when I add the new "Forward Date" you helped me with I get a loop that changes the Forward days which inturn changes the Branch 1 value which returns an incorrect Forward Date. I need Branch 1 to always return 11 days and in the example Forward Days are changing to 10 and so the Branch 1 has changed to 40?

Below the bottom table example is correct and the top table has the Forward Date is added and is now incorrect.

 

I have tried changing the link etc but with no joy.

Thanks in anticipation.

 

Mike_Pitcher_1-1656429748841.png

 

Mike_Pitcher_0-1656429702521.png

 

selimovd
Super User
Super User

Hey @Anonymous ,

 

the start is always difficult. That's the reason we have here a community that helps.

You can create a new measure that is adding the days to today's date:

Added Days = TODAY () + MAX ( myTable[Forward Days] )

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

Best regards
Denis

Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic

Anonymous
Not applicable

Hi Denis,

Thanks for your solution, it worked brilliantly, MAX I will reserch the use of that 

Hey @Anonymous ,

 

MAX is giving you the maximum amount of days in this filter context. You need that because in a DAX measure you always need an an aggregation. So for each row it will anyway just return the only number existing.

 

But I'm happy it solved your issue. If you have any question let me know.

 

By the way, in this community always mark people with an "@" and the name of the person . Otherwise I will not get notified that you replied and you will not get an answer 😉

 

Best regards

Denis

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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