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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
rocky84
Regular Visitor

Adding variable number of days to a date column

Hello

 

Hoping for some help here on Power BI.

 

I have a master data table with data from multiple different periods combined (i.e. data for May month end, June month end, July month end etc.). My data tells me for each transaction the number of outstanding days on the trade until maturity, but it doesnt tell me the exact maturity date, hence I'm trying unsuccessfully to work this out. I can do it in excel and load it that way, but would rather do it in Power BI itself.

 

i.e. Period = 31/07/2022 (in date format & given in the data)

Outstanding Maturity = 89 (in numerical format & given in the data)

 

Maturity date = 28/10/2022 (required date format & NOT given in the data, but would like to derive from 31/07/2022 + 89 days)

 

Can anyone help me out? After this I would then like to group all my data by the new maturity date by months + year

 

any help much appreciated 🙂

 

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@rocky84 , if want to add days to date then you can simply add both, but date should have date data type 

 

[period] + [outstanding date]

 

 

for rest use date as dateadd

Date as Dateadd - Decoding Date and Calendar 5-5 - Power BI Turning 5 Celebration Series
https://community.powerbi.com/t5/Community-Blog/Date-as-Dateadd-Decoding-Date-and-Calendar-5-5-Power...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

vanessafvg
Super User
Super User

 DATEADD ( 'Date'[Date], -1, MONTH )

 

maturity date =
VAR noofdays = 89
VAR result =
    DATEADD ( 'Calendar'[Date], noofdays, DAY )
RETURN
    result

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
vanessafvg
Super User
Super User

 DATEADD ( 'Date'[Date], -1, MONTH )

 

maturity date =
VAR noofdays = 89
VAR result =
    DATEADD ( 'Calendar'[Date], noofdays, DAY )
RETURN
    result

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




amitchandak
Super User
Super User

@rocky84 , if want to add days to date then you can simply add both, but date should have date data type 

 

[period] + [outstanding date]

 

 

for rest use date as dateadd

Date as Dateadd - Decoding Date and Calendar 5-5 - Power BI Turning 5 Celebration Series
https://community.powerbi.com/t5/Community-Blog/Date-as-Dateadd-Decoding-Date-and-Calendar-5-5-Power...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thankyou sir. Always so helpful 😁

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors