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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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