Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi everyone,
I’m working on a Power BI dashboard where I need to handle filtering logic for two types of employees: VIP and Non-VIP. Here's my current setup:
When users select specific VIP employees (e.g., Employee 10, Employee 11) from the "Select VIP" slicer, the visuals only show the selected employees (e.g., 2 VIPs). However, I want the visuals to display:
For example:
I’ve included an example screenshot of the visuals before and after when filtering VIP employees (see attached image).
Unfortunately, I couldn’t upload the dataset file directly, so here’s the dataset structure I’m using:
Employee_ID NAME VIP GROUP
| 1 | Employee 1 | VIP |
| 2 | Employee 2 | VIP |
| 3 | Employee 3 | VIP |
| ... | ... | ... |
| 20 | Employee 20 | VIP |
| 21 | Employee 21 | Non-VIP |
| 22 | Employee 22 | Non-VIP |
| ... | ... | ... |
| 100 | Employee 100 | Non-VIP |
Sorry for inconvenience and Thank you in advance for your help!
Hi @Anonymous_n
You wil neeed two disconnected tables - one containing just the VIPs and the other containing all groups. You can create them using DAX or M. Sample DAX calc tables
ALLEmployees =
SUMMARIZE ( VIPData, VIPData[Employee_ID], VIPData[NAME], VIPData[VIP GROUP] )
VIPEmployees =
SUMMARIZE (
FILTER ( VIPData, VIPData[VIP GROUP] = "VIP" ),
VIPData[Employee_ID],
VIPData[NAME]
)
And then a measure to return based on slicer selections
VIP Filter =
VAR __LOOKUPTABLE =
DISTINCT (
UNION (
VALUES ( VIPEmployees[Employee_ID] ),
SUMMARIZE (
FILTER ( ALLEmployees, ALLEmployees[VIP GROUP] = "Non-VIP" ),
ALLEmployees[Employee_ID]
)
)
)
RETURN
CALCULATE (
COUNTROWS ( VIPData ),
KEEPFILTERS ( TREATAS ( __LOOKUPTABLE, VIPData[Employee_ID] ) )
)
Please see the attached pbix for the details.
Thank you so much! This is almost exactly what I need. There’s just one thing missing—if no VIP selection is made, I want VIPs to be completely excluded from the visuals. Currently, if nothing is selected, it shows all VIPs.
So, if I want to add another slicer that have 2 options: allows user to Include or Exclude VIPs:
Is this possible? Thank you again for your guidance—you’re amazing! 😊
Create a disconnected table either in DAX or power query. Here is the DAX expression for creating a table
Disconnected Employee List = VALUES(Table[Employee Name])
Add the column from this table to your Employee Name Slicer.
Create another measure
EmployeeFilter =
Var __SelectedEmployees = Values(DIsconnectedEmployeeList[Employee Name])
Var __Result = if(SelectedVale[Table[VIP Group]) = "VIP", if(SelectedValue(Table[EmployeeName]) in __SelectedEmployees, 1, 0),1)
Return __Result
Add the above measure as visual level filter and filter condition should be 'Is 1'
Do not forget to make necessary changes to the above expressions as per the table and column names in your model.
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
Thank you for the suggestion! It’s a great approach, but I was hoping to have two separate slicers: one specifically for selecting specific VIPs. Still, I really appreciate your help—thank you so much!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |