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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Theamitbhardwaj
Regular Visitor

DATEADD DAX FUNCTION

I am facing a challenge while using “DATEADD” DAX function. Below is the function I am using

DATEADD('This Month'[Today].[Date],3,Month).

Column “'This Month'[Today]” contain date as “21 oct 2020”, NumberOfIntevals=3, Interval= Month

When I use NumberOfIntevals as 1 it returns me date as “21 Nov 2020” so no issue so far

When I use NumberOfIntevals as 2 it returns me date as “21 Dec 2020” again no issue

But when I use NumberOfIntevals as 3 it returns me “Blank” no value neither error.

Pls help if you already have a solution

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Theamitbhardwaj , Dateadd requires a continuous date in the table. So if the date isn't present, it won't give the right answer

you can use the date instead of dateadd as

Add four months

=

var _date to today()

Return

date(year(_date), Month(_date)+4, day(_date))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Theamitbhardwaj , Dateadd requires a continuous date in the table. So if the date isn't present, it won't give the right answer

you can use the date instead of dateadd as

Add four months

=

var _date to today()

Return

date(year(_date), Month(_date)+4, day(_date))

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.