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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.