cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

TOTALYTD with SAMEPERIODLASTYEAR not working as expected

I have sales data for all of 2016 and up to September for 2017. I am trying to get the 2016 sales up to the last date in 2017.

 

YTD Sales = TOTALYTD(SUM('Sales History'[Sales Amount]), 'Date'[Date]) 

 -- this correctly sums up all of 2017

 

YTD Sales LY = CALCULATE ([YTD Sales], SAMEPERIODLASTYEAR('Date'[Date] )) 

-- expecting SUM('Sales History'[Sales Amount]) for 2016 up until September but returns sum of all rows for 2016. 

 

I am sure my understanding is incorrect somewhere, please help. 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution Sage
Solution Sage

Hi @sanimesa,

 

What about testing this following formulae (replace TOTALYTD with calculate):

YTD Sales = CALCULATE(SUM('Sales History'[Sales Amount]), DATESYTD('Date'[Date]))
 
YTD Sales LY = CALCULATE ([YTD Sales], SAMEPERIODLASTYEAR('Date'[Date] )) 

Thx

 

Ninter

 

View solution in original post

1 REPLY 1
Solution Sage
Solution Sage

Hi @sanimesa,

 

What about testing this following formulae (replace TOTALYTD with calculate):

YTD Sales = CALCULATE(SUM('Sales History'[Sales Amount]), DATESYTD('Date'[Date]))
 
YTD Sales LY = CALCULATE ([YTD Sales], SAMEPERIODLASTYEAR('Date'[Date] )) 

Thx

 

Ninter

 

View solution in original post

Helpful resources

Announcements
November Update

Check it Out!

Click here to read more about the November 2020 Updates!

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform October Community Highlights

Check out the top community contributors across all of the communities

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors