Hello. I have two different tables with pivot tables (in the data model) and pivot charts. One has dates and a timeline slicer. The other has only months. The goal is to connect the timeline from one pivot to the months filter of the other. Can you suggest a vba macro (running as private sub maybe) that recognises the timeline selections and applies them either as filter on the "months" column, or as selections in a hidden "months" data slicer?
I can go as far as detecting the two months selected in the timeline:
frommonth = Month(ActiveWorkbook.SlicerCaches("Timeline_Date").TimelineState.FilterValue1)
tomonth = Month(ActiveWorkbook.SlicerCaches("Timeline_Date").TimelineState.FilterValue2)
How can I then select those months and all months in between in the second pivot?
((If there is a way to avoid vba, thats also fine, however, I could not make the months column work with timeline slicer no matter how I formatted it. Neither did it work to add a third table with dates and months and try to connect the timeline with this and another slicer between the new table and the months one.))
This is an annual spreadsheet so its only for 2022, dates in the timeline are from 01.01.2022 - 31.12.2022.
Thank you!
I can go as far as detecting the two months selected in the timeline:
frommonth = Month(ActiveWorkbook.SlicerCaches("Timeline_Date").TimelineState.FilterValue1)
tomonth = Month(ActiveWorkbook.SlicerCaches("Timeline_Date").TimelineState.FilterValue2)
How can I then select those months and all months in between in the second pivot?
((If there is a way to avoid vba, thats also fine, however, I could not make the months column work with timeline slicer no matter how I formatted it. Neither did it work to add a third table with dates and months and try to connect the timeline with this and another slicer between the new table and the months one.))
This is an annual spreadsheet so its only for 2022, dates in the timeline are from 01.01.2022 - 31.12.2022.
Thank you!