cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
karun_r
Microsoft
Microsoft

Problem with SAMEPERIODLASTYEAR

Hi,

 

I have a wierd issue with SAMEPERIODLASTYEAR function. I am calculating the running total percentage over the actual revenue for each quarter. Let's call this Attainment.

Now, I am trying to compare the attainment values between two years.

I have data for all the dates for the fiscal quarters from previous years (From Jan 1 - Mar 31). And for the current quarter, I have only the data upto the current date. (From Jan 1 - Feb 26). Now when I try to lookup the Attainment value from prev year for the same date using the below formula,

 

AttainmentLY = CALCULATE([Attainment], SAMEPERIODLASTYEAR(DimDate[Date]))

 

I get same values for Attainment and AttainmentLY. How is this possible?

 

There is a one-many relationship between the date columns of DimDate and Sales tables.

 

 

2 REPLIES 2
Zubair_Muhammad
Community Champion
Community Champion

@karun_r

 

In your Table VISUAL or MATRIX VISUAL... are you taking the DATE Column from DIMDATE???

Regards
Zubair

Please try my custom visuals


I am trying with both Table and Matrix.  And yeah, the date column is from a special table I populated using CALENDER function in DAX.

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Top Kudoed Authors