Forum Discussion
Week Over Week Calculations
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
Anonymous:
Your measures are not "sophisticated enough". I need WoW measure to work with last 7D and last 8-14D from any ANY date
Basically, 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
- danzrust8 years agoHelper IV
Hi Vvelarde,
I have already figured it myself.
I working with my custom calendar table.
The function is (for absolute diff):
Clicks WoW Abs =
(
SUMX(FILTER('AdWords KW Data L2W', RELATED('Calendar'[Last X Weeks])="Last Week-00"),'AdWords KW Data L2W'[Clicks])
-
SUMX(FILTER('AdWords KW Data L2W', RELATED('Calendar'[Last X Weeks])="Last Week-01"),'AdWords KW Data L2W'[Clicks])
)Calendar is here (free to use):
https://docs.google.com/spreadsheets/d/1-55vUYZrYKduI8tbuK5nk9GXBUc7X7uNMcS1mXRIdoI/export?format=csv&id=1-55vUYZrYKduI8tbuK5nk9GXBUc7X7uNMcS1mXRIdoI&gid=0Just import it to PBI as "From Web".