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
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
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.

Top Solution Authors