Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not 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 1
Anonymous
Not applicable

Also to clarify that example data is how I'm looking at it in a matrix, it is not my table.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.