Forum Discussion
Override page-level date filter for visual
- Anonymous2 years ago
Hi mmcanelly ,
The test data sheet name is 'Table':You can use the following DAX to create a New Table:
Last5YearsData = CALCULATETABLE( 'Table', FILTER( ALL('Table'[Year]), 'Table'[Year] >= MAX('Table'[Year])-4) )The table you created 'Last5YearsData' will only contain data for the last 5 years.
Then use the table you just created, 'Last5YearsData', to create a line chart. And the final output is shown in the following figure:When I apply the filter, nothing changes:
When I applied slicer, it didn't change either:
Note that when the year comes to the next, you only need to refresh it and you don't need to do anything else to update the line chart.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi mmcanelly ,
The test data sheet name is 'Table':
You can use the following DAX to create a New Table:
Last5YearsData =
CALCULATETABLE(
'Table',
FILTER(
ALL('Table'[Year]),
'Table'[Year] >= MAX('Table'[Year])-4)
)
The table you created 'Last5YearsData' will only contain data for the last 5 years.
Then use the table you just created, 'Last5YearsData', to create a line chart. And the final output is shown in the following figure:
When I apply the filter, nothing changes:
When I applied slicer, it didn't change either:
Note that when the year comes to the next, you only need to refresh it and you don't need to do anything else to update the line chart.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.