Forum Discussion
Anonymous
7 years agoNot applicable
Help Calculating Last Year Value and % Change for a Measure
I have a calculated measure, $ per item (SUM(billed dollars)/SUM(item volume). What I am trying to do eventually is calculate the % change compared to a prior year. From my understanding I first need a value for Last Year $ per item before I can calculate this. So for example I am looking at something like this:
YEAR January
2018 $40.79
2019 $43.89
In the end I am looking for the % change compared to prior year: approx. 7%
I have tried the following already:
$per item LY = CALCULATE([$ per item],SAMEPERIODLASTYEAR([EnteredDate])) <-returns all blanks
$ per item % Change =
IF(
ISFILTERED('vw_xxx'[EnteredDate]),
VAR __PREV_YEAR =
CALCULATE(
[$ per item],
DATEADD('vw_xxx'[EnteredDate], -1, YEAR)
)
RETURN
DIVIDE([$ per Item] - __PREV_YEAR, __PREV_YEAR)
)
Which also returns all blanks.
1 Reply
- AnonymousNot applicable
Also to clarify that example data is how I'm looking at it in a matrix, it is not my table.