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
cca8380
Frequent Visitor

SAMEPERIODLASTYEAR Issues

I tried solving my issue by reviewing other post on this topic but I seem to be stuck. I am unable to get the

SAMEPERIODLASTYEAR function to work for me. Any help would be greatly appreciated.
 
Total_Sales = SUM(Data[Amount]) --> working great
Sales_YTD = TOTALYTD(Data[Total_Sales],'Data'[DATE]) --> working great
Sales_LYTD = CALCULATE(sum(Data[Amount]), SAMEPERIODLASTYEAR('Calendar'[Date])) --> not so much
 
Current Output --- Sales_LYTD same as Sales_YTD... Please help!
YearTotal_SalesSales_YTDSales_LYTD
2015$67,878,999,619.50$67,878,999,620$67,878,999,619.50
2016$78,764,797,884.73$78,764,797,885$78,764,797,884.73
2017$91,052,871,681.36$91,052,871,681$91,052,871,681.36
2018$97,214,994,268.74$97,214,994,269$97,214,994,268.74
2019$66,070,917,033.61$66,070,917,034 
 
 
 
 
 
2 REPLIES 2
amitchandak
Super User
Super User

You can Try below DateYTD or Total YTD

 

Last Year YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date Filer],-12,MONTH)))

 

 

Also in one calculation, you are passing data[date] another one calendar date. Just check the join is correct.

v-shex-msft
Community Support
Community Support

Hi @cca8380 ,

I'd like to suggest you use date function ot manually defined filter range instead to use time intelligence function, it requires a calendar table and not allow you to nest multiple time intelligence functions.

Time Intelligence "The Hard Way" (TITHW)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.