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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
AJ007
Helper I
Helper I

SamePeriodLastYear is blank

I have a dataset with column for years and another column for unemployment rate. I want to calculate the difference year over year. I tried SamePeriodLastYear but it's giving me blank output.

 

I have done lots of tricks to get a dates column as the original dataset didn't have a dates column but only the years column.

 

Please help.

1 ACCEPTED SOLUTION

It works for me.  Note there was one wtone shaped bracket in the orginal formula I posted

 

ly.png



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

5 REPLIES 5

Assuming you have a year column and a value column

 

this year = sum(table[value])

last year = calculate([this year],filter(all(table[year]),table[year]=max(table[year))-1))



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Sorry it didn't work.

 

This is my test data

Unemployment.JPG

 

 

 

It works for me.  Note there was one wtone shaped bracket in the orginal formula I posted

 

ly.png



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Thanks Matt,

 

I will test it and let you know.

 

Appreciate your help on this.

Thanks Matt,

 

I will test it and let you know. Thanks again.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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