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 September 15. Request your voucher.

Reply
pb1051
Advocate II
Advocate II

Show rows from a table after matching one value against that row

Okay, I can't seem to find any examples of what I'm trying to achieve online in the community or on Youtube. 

 

I have a single table:

ProjectVendor
1234John
1234Smith
1234Jane
4321Smith
4321Jane
456John
456Smith

 

I have a slicer for Vendor and I would like to use it to see a table with all the Vendors that match the related Project/Projects with that selected Vendor (John in this case):

ProjectVendor
1234

John

1234Smith
1234Jane
456John
456Smith

 

How can I achieve this? I figured there had to be a way to search the rows for that selected vendor and return all matching project rows for not only them but for all that match that project code.

 

Any help would be appreciated!

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@pb1051 I would create a disconnected table like this: DISTINCT('Table'[Vendor]). In other words, not related to your current table. Then use a complex selector: The Complex Selector - Microsoft Power BI Community

In your case, something like:

Selector = 
  VAR __Vendor = MAX('Vendor table'[Vendor])
  VAR __Projects = SELECTCOLUMNS(FILTER('Table',[Vendor] = __Vendor),"__Project",[Project])
  VAR __Project = MAX('Table'[Project])
RETURN
  IF(__Project IN __Projects, 1, 0)

Put this measure in your visual filter and filter for 1

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@pb1051 I would create a disconnected table like this: DISTINCT('Table'[Vendor]). In other words, not related to your current table. Then use a complex selector: The Complex Selector - Microsoft Power BI Community

In your case, something like:

Selector = 
  VAR __Vendor = MAX('Vendor table'[Vendor])
  VAR __Projects = SELECTCOLUMNS(FILTER('Table',[Vendor] = __Vendor),"__Project",[Project])
  VAR __Project = MAX('Table'[Project])
RETURN
  IF(__Project IN __Projects, 1, 0)

Put this measure in your visual filter and filter for 1

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks, @Greg_Deckler .

 

Should I create the disconnected table with both columns in this case or with only [Vendor]? I tried creating it with one column and the result I get when I add the measure as a filter is I get the last alphabetical ordered vendor when no slicer has been selected.

@pb1051 Right, that is because of the MAX. You could use SELECTEDVALUE instead, that will return BLANK by default if more than one Vendor is in context. You could use an addition IF to check for ISBLANK and just return BLANK or something in that instance.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors