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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
IAmCare
Frequent Visitor

SAMEPERIODLASTYEAR SHOWING CURRENT YEAR

Hello and Thank You.

I am trying to do show data in the same period last fiscal year.

My fact table date is a DATE and My dim table date is a DATE. and the two table are tied to each other with the date column.

This is what I wrote.

R_Last = CALCULATE([R_Current],SAMEPERIODLASTYEAR('Edw DimDate (2)'[Date])) when i use this i get the correct data but I con not use slicers with it.  This is the error message I get when I try to use a slicer.

If I use this

R_Last = CALCULATE([R_Current],SAMEPERIODLASTYEAR('Edw DimDate (2)'[Date].[date])) the data shows the current year data which is incorrect because I am looking for last fiscal years data

 

Any help will be much appreciated. 

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

few questions first:
1) when selecting time, you filter it using fields from 'Edw DimDate (2)'?
2) does [R_Current] have any time intelligence in it? that would tie the filter to a fixed year?
3) the join between the tables is 1 to many, and in one direction?



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

2 REPLIES 2
Stachu
Community Champion
Community Champion

few questions first:
1) when selecting time, you filter it using fields from 'Edw DimDate (2)'?
2) does [R_Current] have any time intelligence in it? that would tie the filter to a fixed year?
3) the join between the tables is 1 to many, and in one direction?



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Thank You so Much. #3 was my answer.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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