cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cca8380 Visitor
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
Community Support Team
Community Support Team

Re: SAMEPERIODLASTYEAR Issues

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 Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
amitchandak Super Contributor
Super Contributor

Re: SAMEPERIODLASTYEAR Issues

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.

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 6 members 1,891 guests
Please welcome our newest community members: