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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Tob_P
Helper V
Helper V

DATEADD issue

Hi,

 

See below...

 

Tob_P_0-1688484970873.png

 

Dax appears to work correctly for calculated column only for dates when the expiry date is in the past.

 

Pay attention to columns Validity Formatted, Date of Issue and New Expires.

 

Cannot see for the life of me why this would not calculate an expiry date for anything that expires on or after today.

 

Can anyone advise?

1 ACCEPTED SOLUTION
some_bih
Super User
Super User

Hi @Tob_P check your part DATEADD (even we could not see from your picture full syntact, only partly)

According to link and picture below result / output should be already in your date column.

https://learn.microsoft.com/en-us/dax/dateadd-function-dax 

some_bih_0-1688536491777.png

Did I answer your question? Mark my post as a solution! Kudos Appreciated!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

3 REPLIES 3
Tob_P
Helper V
Helper V

Tob_P_0-1688539991172.png

Apologies @some_bih 

 

Thank you for the reply - I sort of struggle to understand 'The result table includes only dates that exist in the date column' - does that mean it can only calculate the output of 01/05/2023, 1, YEAR if the date of 01/06/2024 is in the Date column? If that's the case, firstly why would you have a future date in there if not required and secondly, it sort of defeats the purpose of the calculation. Or does it mean that the date of 01/05/2023 has to exist, which it does, for the function to work?

 

Either way, if this function is not going to work for me, is anyone aware of an alternative function that takes a date, and will output future dates based on intervals & years.

 

@some_bih - I will mark your reply as a solution but looking to see if I can get any additional advice to point me in the direction.

Hi @Tob_P I am glad if I can assist you in Power BI experience, no matter kudos or solutions.

Concerning your "issue" with DATEADD, if you simple need to obtain some new / future date based on column which you already have in your data when Power Query, possible alternative solution with new column with function Date.AddYears, like Date.AddYears([<your column name], your reference for adding)

https://learn.microsoft.com/en-us/powerquery-m/date-addyears 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






some_bih
Super User
Super User

Hi @Tob_P check your part DATEADD (even we could not see from your picture full syntact, only partly)

According to link and picture below result / output should be already in your date column.

https://learn.microsoft.com/en-us/dax/dateadd-function-dax 

some_bih_0-1688536491777.png

Did I answer your question? Mark my post as a solution! Kudos Appreciated!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






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.