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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
kedarn1991
Frequent Visitor

DAX For SamePeriodLastYear

I have one Date Table, one table [Active Contracts] with distinct ContractNumber as PrimaryKey, and four other tables which has ContractNumber as Foreign Key and has Date on each of four tables and I have also created Many to One relationship. I am using ContractNumber and Date as Filter.

All the calculation works but the sameperiodLastyear. 

My Recent Year Total DAX looks like  RecentYearRevenue= sum(BaseAmount) + sum(OverageAmount), for the date Range selected. So my Previous Year Total DAX looks like 

Previous Year Revenue= CALCULATE( RecentYearRevenue,SAMEPERIODLASTYEAR('Date'[Date])).
it works for all contracts, but when I filter it by contract number, PreviousYearRevenue is returning BLANK.
Your help will be highly appriciated. Thank you in Advance!
0 REPLIES 0

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

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