Forum Discussion
ViorelCa
Helper I
9 years agoDAX Measure reference error
Dear Colleagues, I get an error when I am referencing the following Measure. CurrentMonth:=CALCULATE( MONTH(Max(Merge1[Date])), Merge1[SalesR2017]<>0) The value of this CurrentMonth mea...
Anonymous
9 years agoNot applicable
Hi ViorelCa
Try this one:
Measure = CALCULATE(
sum(Merge1[SalesR2017]),
MONTH(Merge1[Date])=MONTH(Max(Merge1[Date]))
)- ViorelCa9 years ago
Helper I
Hi Anonymous
The same error.
Actually I am doing this in PowerPivot Excel 2013 and the error does not not have a message, it just shows #ERROR
- Dog9 years ago
Responsive Resident
Hi,
I wonder if it's having an issue build the query to run.
does this work any better.
Sales2017Rcurrent:=
var lastmonth = MONTH(max(Dates[DateKey]))return
CALCULATE(sum(Merge1[[SalesR2017]), MONTH(Merge1[Date]) = lastmonth, Merge1[SalesR2017] <> 0)actually you don't need to last part as summing a zero doesn't matter
Sales2017Rcurrent:=
var lastmonth = MONTH(max(Dates[DateKey]))return
CALCULATE(sum(Merge1[[SalesR2017]), MONTH(Merge1[Date]) = lastmonth)Dog