Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous_n
Frequent Visitor

Power BI - Filter Specific VIP + Show Non-VIP Together in Visuals

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:

  1. Select VIP: A slicer filter that lets users select specific employees from the "VIP" group.
  2. All NAME: A slicer filter that shows all employee names (VIP and Non-VIP combined) but without any pre-applied filtering.

The Problem:

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:

  1. The selected VIP employees.
  2. All Non-VIP employees.

For example:

  • If there are 20 VIP employees, 80 Non-VIP employees, and the user selects 2 VIP employees, the visuals should display:
    • The selected 2 VIP employees.
    • All 80 Non-VIP employees.
    • Total: 82 employees.

Attached Example:

I’ve included an example screenshot of the visuals before and after when filtering VIP employees (see attached image).

Anonymous_n_1-1734855413273.pngAnonymous_n_2-1734855422447.png

 


Attached Dataset:

Unfortunately, I couldn’t upload the dataset file directly, so here’s the dataset structure I’m using:

Employee_ID NAME VIP GROUP

1Employee 1VIP
2Employee 2VIP
3Employee 3VIP
.........
20Employee 20VIP
21Employee 21Non-VIP
22Employee 22Non-VIP
.........
100Employee 100Non-VIP

Questions:

  1. How can I achieve this behavior where the visuals display the selected VIP employees and all Non-VIP employees together?
  2. Are there better ways to handle this scenario using DAX or alternative relationships?

Sorry for inconvenience and Thank you in advance for your help!

4 REPLIES 4
danextian
Super User
Super User

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] ) )
    )

danextian_1-1734873656161.png

Please see the attached pbix for the details.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

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:

  • When Include VIP is selected, the slicer should show VIP names for selection.
  • When Exclude VIP is selected, VIPs should not appear at all (no names to select).

Is this possible? Thank you again for your guidance—you’re amazing! 😊

tharunkumarRTK
Super User
Super User

@Anonymous_n 

 

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

 

 

 








Did I answer your question? Mark my post as a solution!
If I helped you, click on the Thumbs Up to give Kudos.

Proud to be a Super User!


PBI_SuperUser_Rank@2x.png

 

 

 

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!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.