Forum Discussion
Week over Week Comparison
- 8 years ago
You should have Year, Week Number and Weekday columns in your table. Or you can generate with calculated column.
WeekNumber = WEEKNUM(Table[Date],2)
WeekDay = WEEKDAY(Table[Date],2)
Then you can create a measure like:
Difference = SUM ( Table[Sales] ) - CALCULATE ( SUM ( Table[Sales] ), FILTER ( ALL ( Table ), Table[Year] = MAX ( Table[Year] ) && Table[WeekNumber] = MAX ( Table[WeekNumber] ) - 1 && Table[WeekDay] = MAX ( Table[WeekDay] ) ) )Regards,
Hi All,
I am trying to compare "Monday Last week's Sales" with "Monday this week's Sales". To be precise, if today is 'Monday' i want to compare it with last 'Monday', if 'Tuesday then last week 'Tuesday'. so on..
Sales last Monday = 2,450
Sales this Monday = 2,360
Difrerence = 90 (3.6%)
Is there a way to do this as a 'Measure', i want this in KPI visual.
You should have Year, Week Number and Weekday columns in your table. Or you can generate with calculated column.
WeekNumber = WEEKNUM(Table[Date],2)
WeekDay = WEEKDAY(Table[Date],2)
Then you can create a measure like:
Difference =
SUM ( Table[Sales] )
- CALCULATE (
SUM ( Table[Sales] ),
FILTER (
ALL ( Table ),
Table[Year] = MAX ( Table[Year] )
&& Table[WeekNumber]
= MAX ( Table[WeekNumber] ) - 1
&& Table[WeekDay] = MAX ( Table[WeekDay] )
)
)
Regards,
- jcabeza5 years agoFrequent Visitor
I have problems when i have change of the year
- Anonymous4 years agoNot applicable
Hi Guys,
I am trying to calculate the week by week comparison of the total Number of Jobs from Previous week to current week & % change.
I have Year, Week num, Num of jobs from the Data set, what measure do i use here?
i tried to use the above measure, but did not work for me as it is $ Sales & on my report i do not require $sales.
thanks for your help here.
- rusgesig4 years agoHelper IV
I've been looking for for so long, thanks.
- chickadiva4 years agoNew Member
This works great! until I try to filter based on a category field. Is there a way to add a dynamic filter so that this works for each "sales" category?
- Utsav_cpgio3 years agoNew Member
I have a large amount of data because of that i cant use this. can you help me how to compare without dax.