Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a table with courses and dates completed. Each course has a different time period for renewal.
I want to take that date last completed and add days to the date for that row to calculate next due date.
ie.
Course Date Days till due New due date
1 01/01/2020 182 days ?
2 02/02/2020 365 days ?
3 03/03/2020 730 days ?
Fairly new to PBI. Can anyone help with the DAX for this?
Thanks
Solved! Go to Solution.
Hi ,
You can try this:-
New Due Date =
VAR _daysPosition =
FIND ( "days", 'Table (2)'[Days till due ], 1 )
RETURN
'Table (2)'[date]
+ INT ( TRIM ( REPLACE ( 'Table (2)'[Days till due ], _daysPosition, 4, "" ) ) )
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
I just get the following error message:
A single value for column 'Date' in table 'Courses' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregate such as min, max, count or sum to get a single result.
Hi @Phil_PBI_User19 ,
If what you want is a measure, just modify Samarth's code slightly.
New Due Date2 =
VAR _daysPosition =
FIND ( "days", MAX('Table'[Days till due]), 1 )
RETURN
MAX('Table'[date])
+ INT ( TRIM ( REPLACE ( MAX('Table'[Days till due]), 5, 4, "" ) ) )
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data
@Phil_PBI_User19 Since you are trying to create a measure thats why you are getting this error. Try to create a column instead.
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi ,
You can try this:-
New Due Date =
VAR _daysPosition =
FIND ( "days", 'Table (2)'[Days till due ], 1 )
RETURN
'Table (2)'[date]
+ INT ( TRIM ( REPLACE ( 'Table (2)'[Days till due ], _daysPosition, 4, "" ) ) )
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
New due date := [Date] + [Days till due]
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
37 | |
31 | |
26 |
User | Count |
---|---|
95 | |
50 | |
43 | |
40 | |
35 |