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

Sameperiod last 2 year

Hi.

I don't know how to create a measure to compare this year with 2 years ago.
To compare with last year I have used SAMEPERIODLASTYEAR and it works well.

Tks.

Daniel Kataoka.

1 ACCEPTED SOLUTION
AnthonyJoseph
Resolver III
Resolver III

Hi @Anonymous  
You can use parallelperiod function and a calendar table...

Last two years prior =
    CALCULATE (
        SUM ( Table[column_name] ),
        PARALLELPERIOD ( 'Calendar'[Date], -24, MONTH )

Hope this helps!

 

Thanks,

AnthonyJoseph

View solution in original post

1 REPLY 1
AnthonyJoseph
Resolver III
Resolver III

Hi @Anonymous  
You can use parallelperiod function and a calendar table...

Last two years prior =
    CALCULATE (
        SUM ( Table[column_name] ),
        PARALLELPERIOD ( 'Calendar'[Date], -24, MONTH )

Hope this helps!

 

Thanks,

AnthonyJoseph

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.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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