Forum Discussion
Week Over Week Calculations
-7 would give you 1 day only... No?
I need to do last 7 days vs last 8-14 days...
DZ
Hi danzrust
I'm here to help you!
Try this measure out:
Sum of Value this week = CALCULATE(SUM(TABLE[Value]);DATESINPERIOD(TABLE[Date];LASTDATE(TABLE[Date];-7;DAY)
Sum of Value last week = CALCULATE([Sum of Value this week];DATEADD(TABLE[Date];-7;DAY)
Sum of Value this week - Sum of Value last week = [Sum of Value this week] - [Sum of Value last week]
Let me know if this works out. If you need further help, could you possibly provide some test data, whichs simulates your data?
Best,
Martin
- danzrust9 years agoHelper IV
Anonymous:
Your measures are not "sophisticated enough". I need WoW measure to work with last 7D and last 8-14D from any ANY dateBasically, I need this:
I needs to work exactly like the MoM formula in the first post, the only change is the last 7 days vs last 8-14 days instead of months.
- danzrust9 years agoHelper IV
Anyone?
- Vvelarde8 years agoCommunity Champion
hi, try with this:
WoW = VAR Week1 = CALCULATE ( SUM ( Table1[Sales] ), DATESINPERIOD ( Table1[Today], SELECTEDVALUE ( Table1[Today] ) - 1; -7, DAY ) ) VAR Week2 = CALCULATE ( SUM ( Table1[Sales] ), DATESINPERIOD ( Table1[Today], SELECTEDVALUE ( Table1[Today] ) - 8; -7, DAY ) ) RETURN DIVIDE ( Week1, Week2 ) - 1regards
Victor
Lima . Peru