Forum Discussion
Week over Week Change
- 8 years ago
Hi Anonymous,
Try this measure please.
Measure = VAR lastWeekAmount = CALCULATE ( SUM ( Append1[Video Views] ), FILTER ( ALL ( 'Calendar' ), 'Calendar'[WeekNum] = MIN ( 'Calendar'[WeekNum] ) - 1 ) ) RETURN DIVIDE ( SUM ( Append1[Video Views] ) - lastWeekAmount, lastWeekAmount, 0 )I have upgraded the file here: https://1drv.ms/u/s!ArTqPk2pu-BkgROntwcC_mRlVBAU
Best Regards!
Dale
Hi Anonymous,
Try this measure please.
Measure =
VAR lastWeekAmount =
CALCULATE (
SUM ( Append1[Video Views] ),
FILTER (
ALL ( 'Calendar' ),
'Calendar'[WeekNum]
= MIN ( 'Calendar'[WeekNum] ) - 1
)
)
RETURN
DIVIDE ( SUM ( Append1[Video Views] ) - lastWeekAmount, lastWeekAmount, 0 )
I have upgraded the file here: https://1drv.ms/u/s!ArTqPk2pu-BkgROntwcC_mRlVBAU
Best Regards!
Dale
Thank you so much v-jiascu-msft! I've been banging my head on this for a week. Just some quick notes for future people
Calendar =
ADDCOLUMNS (
CALENDAR ( DATE ( 2016, 1, 1 ), DATE ( 2017, 12, 31 ) ),
"WeekNum", WEEKNUM ( [Date] )The above column add will default to Sunday as the week start date. To change to Monday as the start date, simple put ( [Date},2 )
For me, I needed it attached to my main query slicer. The solution I found was adding a column under my main table
Week1 = WEEKNUM('Append1'[Date],2)
I then changed the WoW formula accordingly to reference the main table vs the Calendar table.