cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sanimesa Member
Member

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
Interkoubess Established Member
Established Member

Re: TOTALYTD with SAMEPERIODLASTYEAR not working as expected

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
Interkoubess Established Member
Established Member

Re: TOTALYTD with SAMEPERIODLASTYEAR not working as expected

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
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors