Forum Discussion
Anonymous
6 years agoNot applicable
DateADD for single value
Hi everyone, I am looking for a way to use DateADD (or previousmonth) to have the previous month of the date that I am selecting. Example : VAR SelectedDateCurrent = SELECTEDVALUE('Date'[D...
amitchandak
Super User
6 years agoAnonymous ,
Try like
VAR SelectedDateCurrent = SELECTEDVALUE('Date'[Date])
Return DATE(year(SelectedDateCurrent),Month(SelectedDateCurrent)-1,day(SelectedDateCurrent))
refer
another option
VAR SelectedDateCurrent = maxx('Date' , dateadd('Date'[Date],-1, month))
Return SelectedDateCurrent
dateadd need continuous dates