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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.