cmcreynolds
Active Member
- Joined
- May 21, 2015
- Messages
- 295
Okay, my issue here is that there are several ways to do this. We have data that comes through every day and he asked me this morning for "yesterday's totals and comparison to same day last year"
So, my first inclination was to, within PowerPivot, take TODAY()-364. which would probably give a "close enough" response. BUT, it would not be exact when we have leap years like this year.
Plus, I think he wants the report to compare (for example) 2/16/2016 with 2/16/2015. So, is this accurate:
CALCULATE(........, (filter#1) YEAR([contactdate])=YEAR(TODAY())-1, (filter#2) and this is the weird part MONTH([contactdate])=MONTH(TODAY()-1), (filter #3) DAY????([contactdate])=DAY????(TODAY()-1)))
Is it necessary to use three filters to do this? I'm not sure if I was overthinking it.
So, my first inclination was to, within PowerPivot, take TODAY()-364. which would probably give a "close enough" response. BUT, it would not be exact when we have leap years like this year.
Plus, I think he wants the report to compare (for example) 2/16/2016 with 2/16/2015. So, is this accurate:
CALCULATE(........, (filter#1) YEAR([contactdate])=YEAR(TODAY())-1, (filter#2) and this is the weird part MONTH([contactdate])=MONTH(TODAY()-1), (filter #3) DAY????([contactdate])=DAY????(TODAY()-1)))
Is it necessary to use three filters to do this? I'm not sure if I was overthinking it.