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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
Anonymous
Not applicable

sum complete last year (Year to Year -1)

Hey Guys, 

 

i need your help, please. 

 

I want to measure the Total amount of the last year (YTY-1).

But i have one restiiction: I am using a measure of the YTD. If I filter the month, I get the YTY-1 with filtered values too. But it should measure the total value of the last year

 

Best regards from Germany 🙂

 

my current measure: 

NMVA06_0-1670940624790.pngcurrent_measure.PNG

 

1 ACCEPTED SOLUTION
TomasAndersson
Solution Sage
Solution Sage

Hi!

Do you have a Date table (Set and use date tables in Power BI Desktop - Power BI | Microsoft Learn)?
If so, PREVIOUSYEAR() should work, in the form of:

AA_Betrag_YTY-1 := 
CALCULATE(
    [korrigierter Betrag], //assuming this is the measure you want to calculate
    PREVIOUSYEAR(Dates[Date]) //date column from your date table
    )

 

View solution in original post

2 REPLIES 2
TomasAndersson
Solution Sage
Solution Sage

Hi!

Do you have a Date table (Set and use date tables in Power BI Desktop - Power BI | Microsoft Learn)?
If so, PREVIOUSYEAR() should work, in the form of:

AA_Betrag_YTY-1 := 
CALCULATE(
    [korrigierter Betrag], //assuming this is the measure you want to calculate
    PREVIOUSYEAR(Dates[Date]) //date column from your date table
    )

 

Anonymous
Not applicable

Hi Tomas

yeah, it works well. I know one more function now too. Thanks for that!

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.