Forum

How to Get Dynamic ...
 
Notifications
Clear all

How to Get Dynamic values for slicers

4 Posts
2 Users
0 Reactions
227 Views
(@tlyqtyl)
Posts: 21
Eminent Member
Topic starter
 

Hello All, 

Suppose that I have a calendar table in Power Pivot or Power Query. I want to get some pivot table from this table but since I have many years data in this table. I want to have slicers get to get Top N number first and then get specified year in another slicer for pivot table.

For instance, I have 1, 2, 3 on 'TopN' slicer and if I pick 1, it will show 2022 on 'Year' slicer and if I pick 2, it will show 2022 and 2021 on 'Year' slicer. I have studied the video on this https://www.youtube.com/watch?v=ViPhAnqXOfs but it seems doesn't work.

 
Posted : 11/01/2022 4:46 am
(@mynda)
Posts: 4761
Member Admin
 

Hi, please see an example file attached with a possible solution.

Mynda

 
Posted : 11/01/2022 11:13 pm
(@tlyqtyl)
Posts: 21
Eminent Member
Topic starter
 

Hello Mynda,

Thanks a lot. I tried to understand the method. There is small issue. I wish I can have 'Year' Slicer too so when I select 2, I can have only 2022 & 2021 shown only so that I still can slice the data by 2022 or 2021 respectively.

 
Posted : 13/01/2022 11:26 am
(@mynda)
Posts: 4761
Member Admin
 

You can't do this with this technique. If you add a filter (Slicer) for the year it will override the filter on the 'Include Years' column in the PivotTable, breaking the Top n Years filter.

Mynda

 
Posted : 13/01/2022 8:10 pm
Share: