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
anv
New Member

Open one table by clicking another table cell

Hi,
I am a newbie to Power BI and I am trying to open Table 2 by clicking table 1 cell.

 

The table looks like:

            Table 1                                                                         Table 2
IDCode   |    User   |   Date                       IDCode   |   FirstName   |   SupplyCode   |   Country

1                Mat        2018-01-01                   1             Mat                00110011           USA

2                John       2017-01-09                   1             Mat                98765445           Australia

1                Mat        2018-04-08                   1             Mat                8765779             Canada

3               Jazz         2019-01-01                   3             Jazz                6666666             USA


So basically when I click 'IDCode' 1 in Table 1, Table 2 should show all the three values with 'IDCode' 1 in Table 2.


I created a measure just to first get the firstName in Table 2

 

My query is

 

FirstName = LOOKUPVALUE('Table2'[FirstName], 'Table2'[IDCode], SELECTEDVALUE('Table1'[IDCode]))

 

But this query returns only distinct value, not sure how do I get all the three values.

 

I also tried creating a custom column

FirstName = CALCULATE (VALUES('Table2'[FirstName]),FILTER ( 'Table2', 'Table2'[IDCode] = SELECTEDVALUE(Table1[IDCode] )))

But this is giving me circular dependency detected error.

 

Is there any other way to get the expected result?

1 ACCEPTED SOLUTION
v-cherch-msft
Employee
Employee

Hi @anv

 

You may create the relationship as many to many in relationship view.Attached the sample file.

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-cherch-msft
Employee
Employee

Hi @anv

 

You may create the relationship as many to many in relationship view.Attached the sample file.

1.png

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.