Forum Discussion
aatish178
2 years agoHelper IV
How to create a calculated date column using an existing date column
Hi All, I have a ReportDate column in a table. This column has dates from 1974-01-01 till 2026-01-01 and I want to create another calculated column using that existing ReportDate column. The new c...
- 2 years ago
aatish178 , Try creating a new calculated column using below
NewReportDate =
VAR TodayDate = TODAY()
VAR StartDate = EDATE(TodayDate, -36) -- 36 months back from today
VAR EndDate = EOMONTH(TodayDate, 0) -- End of the current month
RETURN
IF(
'YourTable'[ReportDate] >= StartDate && 'YourTable'[ReportDate] <= EndDate,
'YourTable'[ReportDate],
BLANK()
)
bhanu_gautam
2 years agoSuper User
aatish178 , Try creating a new calculated column using below
NewReportDate =
VAR TodayDate = TODAY()
VAR StartDate = EDATE(TodayDate, -36) -- 36 months back from today
VAR EndDate = EOMONTH(TodayDate, 0) -- End of the current month
RETURN
IF(
'YourTable'[ReportDate] >= StartDate && 'YourTable'[ReportDate] <= EndDate,
'YourTable'[ReportDate],
BLANK()
)