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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
oddarin
New Member

Select values based on selection from non-related table

Hi,

I wonder if is it somehow possible to select values from table based on value from non-related table (or, in fact, related but not in a way needed in that task)?

I mean I have one table with some codes and I want to be able to show in report all rows from another table with the code selected in the first table, something like filter on TableB[code] = SELECTEDVALUE(TableA[code]). I tried to create some sort of a measure with variable but I'm a novice in PBI and I'm definitely doing something wrong, because whereas it seems as quite an easy task - simply pass and get the value, but nothing works for me

4 REPLIES 4
Arul
Super User
Super User

@oddarin ,

It is possible. Can you please provide some sample data and expected output in the expected visual?

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


@Arul Thank you for the reply!

I have that kind of data

oddarin_0-1679642152790.png

And I expect if I select vendor code in the first table, in second I'll see all orders with that vendor code

oddarin_1-1679643219544.png

So the main task is to pass the value of the selected code to use it for the filtration in the second table as if that two tables have actual relationship by vendor code (which they don't have)

@oddarin ,

Based on my research so far I have achieved it through measure which you need to apply at visual level, before selection the visual will be blank but if you select any code in table it will display in table.

 

Interaction = 
VAR _values = VALUES('List 2'[Value])
VAR _result = IF(SELECTEDVALUE('List 1'[Value]) IN _values,1,0)
RETURN _result

 

Arul_1-1679654357397.png

 

Arul_0-1679654298402.png

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


g_m_j
Frequent Visitor

This worked perfectly for me thanks

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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