D.S.
D.S.

Reputation: 1413

DAX: Subtract X Years/Days/Months from NOW()

I'd like to create a dynamic date table, the date range is NOW - 3yr to NOW. How is this done in DAX?

I know how to use the calendar function, and have used the MIN and MAX on a table of invoices to get the start/end dates, but now need to get the current date -3 years.

Upvotes: 2

Views: 25466

Answers (1)

D.S.
D.S.

Reputation: 1413

Figured it out, I used this:

Date Filter = CALENDAR(DATE(YEAR(TODAY()) - 3,MONTH(TODAY()),DAY(TODAY())),today()) 

Upvotes: 3

Related Questions