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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Bridgett
New Member

Same Period Last Year not calculating correctly with date filter

Hi All, 

 

Having some issues I am hoping you can help with

 

I have a Calendar Table that I created in Power BI - basically using the principles in the link here 

https://exceleratorbi.com.au/build-reusable-calendar-table-power-query/

 

In essence, It has a "Date"column from 01/01/2014 to the current date

 

My data table - called "SellThrough" is linked to the "Calendar" Table via the "Date" Column (Many to One relationship, Single Cross Filter direction, Active relationship)

 

The data table in question has a column called "Sell through (Units)" which I have two measures calculating from:

 

Total Sum Sell through = sum(Sellthrough[Sell through (Units)])

Total Sum Sellthrough LY = CALCULATE([Total Sum Sell through],SAMEPERIODLASTYEAR('Calendar'[Date]))

 

This is to compare last year sales vs this Year sales for the same period

 

However, when I add any sort of Date filtering (using Date function from my created "Calendar" Table), The Total Sum Sell through is calculated correctly, however Total Sum Sellthrough LY is not and is displaying a result that I don't know where it is coming from!

 

When in a table it seems to have the correct information in the body, but the total is some random quantity!

 

I have a sample PBIX file that I can send and I have an image of an example of what is happening if anyone thinks they can shed some light on the issue, however for some reason I can't attach either here

 

Thanks!

3 REPLIES 3
nate17
Regular Visitor

Hi I have exactly the same issue. Did you find a resolution to this?

Bridgett
New Member

Date TY vs LY issue.PNG

Figured out how to add an image

Hi @Bridgett ,

Could you please offer your pbix file and post your desired result if possible? You could upload your file to Dropbox or OneDrive and send the link here that I could have a test for you.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

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.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.