cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bdl5119
Frequent Visitor

How to have multiple slicer selections with a single forced choice.

Hello,

I want to pass a table to a python visualization in powerbi. I am always passing two KPI's at all times. Eg: KPI_0 and a second KPI.
At the moment my current solution is to have two items selected from the slicer.[Current solution tab]

Current_Solution.png


However, I would like it to improve it so that KPI_0 is always selected by default. This way the user only has to choose a second KPI.

I have made an attempt where KPI_0 and the second KPI is seperated into two tables with different column names.
However combining the two tables did not bring any benefit [Attempt1 tab].

 

 

In my second attempt, I have combined the two tables using power query and seperated the KPIs into seperate columns. However when using two slicers for the two columns, the slicers are working as 'AND' logic rather than 'OR' logic. i.e. when KPI_0 is chosen KPI_1 is blank and vice versa. 

 

Attempt2.png

 

How can I always have KPI_0 selected and have the use choose only KPI_1 or KPI_2 only? 

I have attached the source file here.

3 REPLIES 3
V-pazhen-msft
Community Support
Community Support

@bdl5119 

There is no such feature in power bi, as the workaround you can create measure to achieve this with following steps:

 

1. create a table, and use the new KPI column as the slicer.

Slicer Table = distinct[table[KPI])

2. create the expected return with measure:

KPI_0&Selected = CALCULATE(COUNT('Table'[KPI]),FILTER('Table',[KPI]="KPI_0" || [KPI]=SELECTEDVALUE('Slicer Table'[IKPI])))
 
 
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
jdbuchanan71
Super User
Super User

@bdl5119 In your current solution you could set the slicer to have only KPI_0 selected but change it so selecting another KPI does not unselect KPI_0.

jdbuchanan71_0-1634220437926.png

That way the user can come in and just click on KPI_1 to turn it on as well.

 

@ jdbuchanan71, thank you for your answer. However, in this option the user has the ability to unselect KPI_0 and select KPI_1 or KPI_2 on their own. I want to have KPI_0 selected at times. Hence I tried to seperate the slicers and hide the KPI_0 slicer from my users.

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors