Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi - I have a table like:
I have a slicer on Staff Name and a table that shows other info in the table for the selected Staff Name
I'm trying to build a measure I can use to filter a second table on the page to show other Staff that have the same Supervisor. The second table is set to have no interaction with the slicer. I've tried some variatons on this theme:
Measure =
VAR _sup = SELECTEDVALUE(Table[Supervisor Name])
VAR _tab = SELECTCOLUMNS(filter(all(Table), Table[Supervisor Name] = _sup), "Supervisor", Table[Supervisor Name])
RETURN
if(_sup in _tab, 1, 0)
Countrows(_tab) shows the expected number of rows based on the person selected in the slicer, but the Measure seems to be set to 1 for all rows in Table.
Have also tried using CALCULATETABLE with the same result. School me!
Solved! Go to Solution.
Hi @rack201
I ran the testing as follows.
tables:
The table acts as a slicer.
Create a measure as follows
Measure =
VAR _supername = CALCULATE(MAX('Table'[Supervisor Name]), FILTER('Table', [Staff Name] = SELECTEDVALUE('staff'[Staff Name])))
RETURN
IF(MAX('Table (2)'[Supervisor Name]) = _supername && MAX('Table (2)'[Staff Name]) <> SELECTEDVALUE(staff[Staff Name]), 1, 0)
Put the measure into the visual-level filters, set up show items when the value is 1.
Is this the result you expect?
If I've misunderstood you, please provide the result you are hoping for. Please remove any sensitive data in advance.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @rack201
I ran the testing as follows.
tables:
The table acts as a slicer.
Create a measure as follows
Measure =
VAR _supername = CALCULATE(MAX('Table'[Supervisor Name]), FILTER('Table', [Staff Name] = SELECTEDVALUE('staff'[Staff Name])))
RETURN
IF(MAX('Table (2)'[Supervisor Name]) = _supername && MAX('Table (2)'[Staff Name]) <> SELECTEDVALUE(staff[Staff Name]), 1, 0)
Put the measure into the visual-level filters, set up show items when the value is 1.
Is this the result you expect?
If I've misunderstood you, please provide the result you are hoping for. Please remove any sensitive data in advance.
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
8 | |
8 | |
8 | |
6 |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |