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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Catherinegrace
New Member

Year on Year change without using a date variable

Hi, 

 

I am trying to calculate the change of cashflows each year. In the table below, I have the Time step and value columns in the underlying spreadsheet used in my PBI dashboard. 

 

Catherinegrace_0-1622123332586.png

 

I would like to create a mesaure which outputs the change in values i.e. Time step 1 value less time step 0 value. 

 

I have used the following measure but it is not working as expected (please see screenshot of the table from PBI): 

Change in value =
    VAR __PREV_YEAR =
        CALCULATE(
            SUM('Data Set'[Value]),
            ('Data Set'[Time step] -1 )
        )
    RETURN
        SUM('Data Set'[Value]) - __PREV_YEAR
 
Catherinegrace_1-1622123411375.png

 

Any help would be greatly appreciated!

 

Katie 

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi, @Catherinegrace 

Please try the below measure.

 

Change in value =
VAR __PREV_YEAR =
CALCULATE (
SUM ( 'Data Set'[Value] ),
FILTER (
ALL ( 'Data set' ),
'Data Set'[Time step]
= MAX ( 'Data set'[Time Step] ) - 1
)
)
RETURN
SUM ( 'Data Set'[Value] ) - __PREV_YEAR

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Hi Jihwan, 

 

Thanks for your reply. Unfortunately this is not working and gives: 

Catherinegrace_0-1622128666488.png

 

 

There is other data in my underlying excel but filtering on the correct parts should give the correct change in value. Please let me know if you have any other suggestions

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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