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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.