Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Programmatically Select a Slicer Value

Is there a way to programmatically select a slicer value in Power BI?

I am only interested in using the official slicer control, and not any third party ones (which I've read are quite buggy).

 

I have two slicer controls, where the first slicer (multiselect) can filter the second slicer, but not the other way around (it is actually a bit more complicated than that, but it too messy to write it all here!)

 

If I have a value 'A' selected in the second slicer, but I then deselect a value in the first slicer that contains 'A', the second slicer control still has 'A' selected (even though it should not even be present). As soon as I select another value in the second slicer, 'A' gets removed. 

 

I realise that in an ideal world, the two slicers should be cross-filtering each other so this scenario cannot happen, but it is a customer requirement that the first filter always contains all the values.

 

This could be resolved if I was able to ensure that the second slicer defaults to another value that I know will be present.

TBH, I've read nothing that suggests this is possible, so any other suggestions would be welcome. 

 

 

  • This is not possible in regular Power BI. You may be able to do this in Power BI Embedded.

1 Reply

  • This is not possible in regular Power BI. You may be able to do this in Power BI Embedded.