Forum Discussion
Syndicate_Admin
Administrator
3 years agoDATEADD from another measure
Hello! I need to generate a formula that brings me the minimum date of a column, minus 3 months. Generate a calculated measure to bring back the oldest date (MIN). That's what I wanted to apply a ...
- Anonymous3 years ago
Hi Verosb ,
You can create a measure as below to get it, please find the details in the attachment.
3 months before Mindate = VAR _mindate = CALCULATE ( MIN ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) ) VAR _premonth = EOMONTH ( _mindate, -3 ) VAR _minday = DAY ( _mindate ) VAR _preday = DAY ( _premonth ) RETURN IF ( _minday > _preday, _premonth, DATE ( YEAR ( _premonth ), MONTH ( _premonth ), DAY ( _mindate ) ) )Best Regards
Anonymous
3 years agoNot applicable
Hi Verosb ,
You can create a measure as below to get it, please find the details in the attachment.
3 months before Mindate =
VAR _mindate =
CALCULATE ( MIN ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) )
VAR _premonth =
EOMONTH ( _mindate, -3 )
VAR _minday =
DAY ( _mindate )
VAR _preday =
DAY ( _premonth )
RETURN
IF (
_minday > _preday,
_premonth,
DATE ( YEAR ( _premonth ), MONTH ( _premonth ), DAY ( _mindate ) )
)
Best Regards