Hi Tableau Community,
If you see the .twbx I've attached with this thread, you'll notice it's currently doing a 'Current Year vs Previous Year' comparison. I want to modify the report in such a way that a user is able to select the comparison window till last N years.
For eg, say the user selects "Last 3 Years" in the "Start Date Range" parameter to compare, he should see the calculations for the year 2023 (CY), 2022 (PY) & 2021.
To help you, it has got something to do with my-
- Parameter: [Start Date Range]
- Calculated Filed: [Date Filter]
I've tried all permutations and combinations but I can't seem to get it right 🥲
Any help on it is greatly appreciated.
@Ayush Srivastava​ ,
For comparing last n years , you need to make parameter along with date range filter.
1) Create a parameter date range.
2) Next create a calculated field i.e. date range config.
3) Drag date range config in the filters pane and select true as it filters out the selected years.
Attaching workbook for your reference.
Hope this helps!
(Please upvote and select as best answer if this is helpful)