Forum Discussion

PERMATA's avatar
PERMATA
Frequent Visitor
3 years ago

MAT & MAT Prior has same value using SAMEPERIODLASTYEAR

Hi Expert 

 

I am still learning in DAX and trying to calculate MAT, PYMAT

this is the formula I use

 

MAT = CALCULATE(
AVERAGE(data[value]),
DATESINPERIOD('Date'[Date],LASTDATE('Date'[Date]),-1,YEAR)
)

pMAT = CALCULATE([MAT],SAMEPERIODLASTYEAR('Date'[Date].[Date]))

 

 
but somehow it produces the same value 😞 please help with this
I have tried to search in this community but the solution is still producing the same value
 
Thank you 
 

 

 

 

7 Replies