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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
KHP
Regular Visitor

Reference a selected value in a slicer that is not linked to the Matrix

I am working on creating a matrix table that shows a series of measures for one specific vendor "vendor A" and another vendor that is selected by a slicer visual on the page. 

 

I had the idea to write a true/false measure that would return true if vendor is vendor A or if is selected by the slicer.  I have not been able to get this to work because the matrix table cannot be affected by the vendor slicer otherwise vendor A will not show up.  If they aren't linked then the selectedvalue function returns true for all vendors

 

I am wondering if anyone has any assistance with this.  Below is the measure i was trying to use:

 

Vendor Comp =
    IF (
        OR (
            "Vendor A" in VALUES(app_tblVendors[Vendor]),
            SELECTEDVALUE(app_tblVendors[Vendor])=SELECTEDVALUE(app_tblVendors[Vendor])
        ),
        TRUE(),
        FALSE()
    )
   
2 ACCEPTED SOLUTIONS
BeaBF
Super User
Super User

@KHP Hi! try with these steps:

1. Create a disconnected table for slicer. This table should not have a direct relationship with your main vendor table.


SlicerVendors = VALUES(app_tblVendors[Vendor])


2. Create the selection measure:

VendorComp =
VAR SelectedVendor = SELECTEDVALUE(SlicerVendors[Vendor])
RETURN
IF (
"Vendor A" IN VALUES(app_tblVendors[Vendor]) ||
SelectedVendor IN VALUES(app_tblVendors[Vendor]),
TRUE,
FALSE
)


3. Add a slicer visual to your report using the SlicerVendors table.

4. Add the VendorComp measure to the filter pane of your matrix table and set it to filter where the measure is TRUE.

 

BBF

View solution in original post

Anonymous
Not applicable

Thanks for the reply from @BeaBF , please allow me to provide another insight:

 

Hi @KHP ,

 

You should create a slicer table first, and then try formula like below:

vkongfanfmsft_0-1722568399182.png

 

VendorComp = 
VAR SelectedVendor = SELECTEDVALUE(SlicerVendors[Vendor])
RETURN 
IF (
    "Vendor A" IN VALUES(app_tblVendors[Vendor]) || 
    SelectedVendor IN VALUES(app_tblVendors[Vendor]), 
    TRUE, 
    FALSE
)

 

vkongfanfmsft_1-1722568412002.pngvkongfanfmsft_2-1722568419505.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks for the reply from @BeaBF , please allow me to provide another insight:

 

Hi @KHP ,

 

You should create a slicer table first, and then try formula like below:

vkongfanfmsft_0-1722568399182.png

 

VendorComp = 
VAR SelectedVendor = SELECTEDVALUE(SlicerVendors[Vendor])
RETURN 
IF (
    "Vendor A" IN VALUES(app_tblVendors[Vendor]) || 
    SelectedVendor IN VALUES(app_tblVendors[Vendor]), 
    TRUE, 
    FALSE
)

 

vkongfanfmsft_1-1722568412002.pngvkongfanfmsft_2-1722568419505.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

BeaBF
Super User
Super User

@KHP Hi! try with these steps:

1. Create a disconnected table for slicer. This table should not have a direct relationship with your main vendor table.


SlicerVendors = VALUES(app_tblVendors[Vendor])


2. Create the selection measure:

VendorComp =
VAR SelectedVendor = SELECTEDVALUE(SlicerVendors[Vendor])
RETURN
IF (
"Vendor A" IN VALUES(app_tblVendors[Vendor]) ||
SelectedVendor IN VALUES(app_tblVendors[Vendor]),
TRUE,
FALSE
)


3. Add a slicer visual to your report using the SlicerVendors table.

4. Add the VendorComp measure to the filter pane of your matrix table and set it to filter where the measure is TRUE.

 

BBF

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.