Forum Discussion
BBConsultancy
1 year agoHelper I
Dynamic column chart 10 weeks
Hi, In my Power BI report I want to put a column chart that show the [Sales] of the selected week and 10 weeks prior. I want to select the week using a slicer. I tried multiple things: 1. Mea...
- 1 year ago
Thanks! It definitely pointed me in the right direction. The DATESINPERIOD function doesn't accept weeks unfortunately, but I replaced that part with:
VAR _MinWeek = _ChosenWeek- 10VAR _MaxWeek = _ChosenWeek+ 1VAR _DateRange =FILTER(ALL('Previous Reporting Date'),'Previous Reporting Date'[WeekNr] >= _MinWeek &&'Previous Reporting Date'[WeekNr] <= _MaxWeek &&'Previous Reporting Date'[Year] = _ChosenWeek)
johnt75
1 year agoSuper User
You can use the technique described in https://www.sqlbi.com/articles/show-previous-6-months-of-data-from-single-slicer-selection/