Showing results for 
Search instead for 
Did you mean: 

Date as Dateadd - Decoding Date and Calendar 5-5 - Power BI Turning 5 Celebration Series

Problem Description:

Add Days, Month, and Year to a noncontinuous Date column or stand-alone Value. 

Solution Overview :

In Date we can add and subtract dateparts from respective Date Parts
Solution: In date Add/Subtract Year, Month, and Day.  You can even subtract more than 30 days or more than 12 months





Date = CALENDAR(date(2018,1-12,1),TODAY())







Today = TODAY()
Month Back Date = Var _DT = Today() 
return Date(year(_DT),Month(_DT)-1,Day(_DT))

Year, Month, day Back Date = Var _DT = Today() 
return Date(year(_DT)-1,Month(_DT)-10,Day(_DT)-1)






You can also find a pbix attached to this blog.

My Previous Blogs -

Week Is Not So Weak,

Date Difference Across Table- Direct Query Mode, Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard Time Periods and Comparing Data Across Date Ranges
Connect on LinkedIn