Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
Solved! Go to Solution.
@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
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:
VendorComp =
VAR SelectedVendor = SELECTEDVALUE(SlicerVendors[Vendor])
RETURN
IF (
"Vendor A" IN VALUES(app_tblVendors[Vendor]) ||
SelectedVendor IN VALUES(app_tblVendors[Vendor]),
TRUE,
FALSE
)
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.
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:
VendorComp =
VAR SelectedVendor = SELECTEDVALUE(SlicerVendors[Vendor])
RETURN
IF (
"Vendor A" IN VALUES(app_tblVendors[Vendor]) ||
SelectedVendor IN VALUES(app_tblVendors[Vendor]),
TRUE,
FALSE
)
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.
@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
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |