cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors