Forum Discussion
How to dynamically select options from a filter/slicer?
Hi 13havya
I cover a few options in my blog post here, which you may want to take a look at (which you might have already done! 🙂
A problem, however, is that the methods I suggest don't work perfectly with drop-down slicers. This is because the "caption" of a drop-down slicer (i.e value displayed on the slicer) is hard-coded in the Power BI report file. It is not updated automatically even if the underlying filter changes, until a report viewer interacts with the slicer in some way. So the filter may in fact update from August to September, but the slicer will still show August until it is clicked on.
If you are happy to use a vertical list or Button slicer rather than a drop-down slicer, then either of these solutions may be suitable:
- Solution 2 : Set Calendar Month column's Group By Columns property to Month Offset
- Solution 3: Button slicer with a measure value displayed
If you really need drop-down, the best solution I know of is:
- Solution 5: Use the Preselected Slicer custom visual with a boolean measure that returns true for the month with Month Offset = 0.
Does any of that help?
Regards