Forum Discussion
rsbin
6 years agoCommunity Champion
Week on Week comparison in a Clustered Column Chart
Good Afternoon, I am using a Clustered Column Chart to create a Week by Week comparison for 2020 vs 2019. Dataset starts at Jan 1, 2019 I have WeekNumber on the X-axis and Year in my Legend. I...
- 6 years ago
Assuming you have a Date table with a WeekNumber column, you should be able to use a measure like this that should give nonblank/shown values for the last 13 weeks.
NewMeasure = VAR thisweek = WEEKNUM ( TODAY () ) RETURN CALCULATE ( [Your Measure], KEEPFILTERS ( FILTER ( ALL ( 'Date'[WeekNumber] ), 'Date'[WeekNumber] <= thisweek && 'Date'[WeekNumber] >= thisweek - 12 ) ) )If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
mahoneypat
6 years agoMicrosoft Employee
Assuming you have a Date table with a WeekNumber column, you should be able to use a measure like this that should give nonblank/shown values for the last 13 weeks.
NewMeasure =
VAR thisweek =
WEEKNUM ( TODAY () )
RETURN
CALCULATE (
[Your Measure],
KEEPFILTERS (
FILTER (
ALL ( 'Date'[WeekNumber] ),
'Date'[WeekNumber] <= thisweek
&& 'Date'[WeekNumber] >= thisweek - 12
)
)
)
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
rsbin
6 years agoCommunity Champion
Good Evening mahoneypat
Thanks for the reply and suggested solution. I will give it a shot in the morning and let you know how I make out.
Thanks again and Best Regards,