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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.