1
votes

I am new to DAX. Below is my code:

var maxdate = MAX((DATEADD(DimDate[Date], -1 , month)))

From research, DATEADD returns A table containing a single column of date values.

However, I get the following error when I try to save the measure "The MAX function only accepts a column reference as an argument." What is the name of the column in the table return by DATEADD so I can reference it.

1
What is this variable intended to return? - Alexis Olson

1 Answers

0
votes

The code below works for me:

VAR maxdate = LASTDATE ( DATEADD ( DimDate[Date],-1, MONTH ) )