Forum Discussion
nrenaud
6 years agoHelper I
Percent Change with multiple values between years
Hello! I am creating a matrix that consists of years (along the columns) and different values (along the rows - these also pull from different tables). I am wondering if there is a way to create a p...
v-xuding-msft
6 years agoCommunity Support
Hi nrenaud ,
The formulas that amitchandak suggests should work fine. You also could try DATEADD and SAMEPERIODLASTYEAR function to calculate the values of last year if you are using calendar table.
Measure =
var thisYear = CALCULATE(SUM('Table'[Sales]))
var lastYear = CALCULATE(SUM('Table'[Sales]),DATEADD('Date'[Date],-1,YEAR))
return
DIVIDE(thisYear-lastYear,lastYear)Measure 2_SAMEPERIODLASTYEAR =
var thisYear = CALCULATE(SUM('Table'[Sales]))
var lastYear = CALCULATE(SUM('Table'[Sales]),SAMEPERIODLASTYEAR('Date'[Date]))
return
DIVIDE(thisYear-lastYear,lastYear)
https://www.youtube.com/watch?v=80i8rLQtO3o
https://www.youtube.com/watch?v=6vJIAJNTdG0