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
james_pease
Helper III
Helper III

LY Sales Measure is displaying current year sales

Hello everyone, I created a measure for last year sales and plan to do the same for 2 years back. I created the following measure:

 

LY Sales = CALCULATE(Sum(Cotti_Coupon[Sales]), SAMEPERIODLASTYEAR(Date_Value[DateValue].[Date]))
 
Does anyone know why the LY Sales are displaying the values for the the current year instead of LY?
james_pease_0-1665072260301.png
I am expecting to see the following values in the LY column
james_pease_2-1665072392250.png

Here are my relationships. As you can see, store #s are connected to a master store list, and dates are connected to a date table

james_pease_3-1665072469237.png

Thank you in advance!

1 ACCEPTED SOLUTION

And your date table is marked as such ?

 

View solution in original post

5 REPLIES 5
AilleryO
Memorable Member
Memorable Member

Hi,

 

Since you have a date table, you should use the date of your date table and not the one from the fact table.

One more thing do not forget to mark your date table as a date table, and to link (seems done on your screencopy).

But the stange thing is that you might have forgotten something, because if your date is related to your date table or coming from the date table, you should not see the date hierarchy (Date.Year or Date.Month...).

So that's why I'm guessing your table is not marked or linked properly 😉

Let us know

Sorry, Yes I selected the Date column from the Coupon table, but even when I select the date from the date table, the values for LY = current sales

james_pease_1-1665072968507.png

 

Here are the relationships

james_pease_2-1665073028437.png

 

 

 

And your date table is marked as such ?

 

WOW thank you, I feel dumb.

No worries it happens to all of us...

and dumbness is well shared amongst all of us, with an equal distribution 😉

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.