Forum Discussion
Display last 4 weeks data based on selected week
- 9 years ago
Hi MaxTrumblay
Create a Date table but don't link it to your main data table. Make sure your new date table has a week starting column that matches your data table.
Then simply create this measure on your data table and add it as a filter on your bar chart.
Date Range Filter = IF( MAX('Table1'[Date]) <= MIN('Dates'[WeekStarting]) && MAX('Table1'[Date]) >= MIN('Dates'[WeekStarting])-21 -------------------------------------------------------- , 1 , 0)Here is a link to a PBIX file so you can see it working
Hi MaxTrumblay
Create a Date table but don't link it to your main data table. Make sure your new date table has a week starting column that matches your data table.
Then simply create this measure on your data table and add it as a filter on your bar chart.
Date Range Filter = IF(
MAX('Table1'[Date]) <= MIN('Dates'[WeekStarting])
&& MAX('Table1'[Date]) >= MIN('Dates'[WeekStarting])-21
--------------------------------------------------------
, 1 , 0)Here is a link to a PBIX file so you can see it working
Hi Phil_Seamark
I tried your formula, but i have something modified according to my need i have replaced the weekstartingdate to weekendingdate and the formula is wroking perfectly fine showing me the 3 weeks after the date which i select. But this is working only in bar or line chart level but its not working with the matrix table. When i bring the week end column into column field my matrix table goes blank. I am trying to achive something like below :
Can you please help me on this ?