Grand Total not working properly


I am trying to do a sales by day comparison where I compare the sales this year with the sales of the same day last year as a date of the week.

So I would be comparing Monday March 25 2019 with Monday march 24 2018 etc

However, my total isn’t working right for my sales last year. It will just be the total for 1 day (and that day seems to change as my date range increases)

Here is the forumula I’m using for last year’s sale

Amount per Day LY = CALCULATE([Amount TY], FILTER(all(Dates), Dates[Date] = MAX(Dates[Date])-364))


Looks like you have a dedicated date table, so that’s good. Just be sure it’s marked as data table. Then you can use either er of the following:

SamePeriodLast Year:=CALCULATE( [Sales Amount], SAMEPERIODLASTYEAR( ‘Calendar’[Date] ))


Date Add:=CALCULATE( [Sales Amount], DATEADD( ‘Calendar’[Date], -1, YEAR ) )

They both do the same thing and I’m pretty sure internally SAMEPERIODLASTYEAR is using DATEADD


1 Like

I had forgot about date add.

CALCULATE([Amount TY], DATEADD(Dates[Date], -364,DAY)

is what I wanted.