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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
nzboan
New Member

Difference between 2 dated values

I want to calculate the difference in % between two dated values, like in this example:

 

January 2016: 10

January 2017: 11

%diff: +10%

 

This is what i've managed to do until now: 

 

Capture.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

If I understand you correctly, you can use SAMEPERIODLASTYEAR(). 

Amount (same time last year)

= CALCULATE(
SUM(FactInternetSales[SalesAmount]),

SAMEPERIODLASTYEAR(OrderDate[FullDateAlternateKey]),

ALL(OrderDate)

)

For example, this should give you:

 

Order Date (Year)          Sale Amount         Calc Sale Amount Same Last Year         
2016                                       10
2017                                       11                          10

From there, you should be able to calculate %diff.


There's a good article about Time Intelligence function, including SAMEPERIODLASTYEAR() - http://radacad.com/secret-of-

time-intelligence-functions-in-power-bi

 

Hope this helps.

 

View solution in original post

2 REPLIES 2
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @nzboan,

 

Have you tried the solution provided by @Anonymous above? Does it work in your scenario? If it works, could you accept it as solution to close this thread?

 

If you still have any question on this issue, feel free to post here. Smiley Happy

 

Regards

Anonymous
Not applicable

Hi,

 

If I understand you correctly, you can use SAMEPERIODLASTYEAR(). 

Amount (same time last year)

= CALCULATE(
SUM(FactInternetSales[SalesAmount]),

SAMEPERIODLASTYEAR(OrderDate[FullDateAlternateKey]),

ALL(OrderDate)

)

For example, this should give you:

 

Order Date (Year)          Sale Amount         Calc Sale Amount Same Last Year         
2016                                       10
2017                                       11                          10

From there, you should be able to calculate %diff.


There's a good article about Time Intelligence function, including SAMEPERIODLASTYEAR() - http://radacad.com/secret-of-

time-intelligence-functions-in-power-bi

 

Hope this helps.

 

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors