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
alexa_0028
Resolver II
Resolver II

Select specific column in a table based on filter from static unrelated table

Hi All,

Please see below diagram for detail :

Requirement
:  My requirement is when I select code name in the static table , the product_name with code gets displayed in the table.

GIVEN : I have static table with list of codes and code name.
I have a table with product_key and product_name  in different codes
These 2 tables are not linked.

WHEN : When I choose filter on code name like below "Italy" the highlighted value should appear in Product Name Table.

Please help me to achieve this in Power BI.
I am really stuck here and looking for possible alternatives.

alexa_0028_0-1634294507883.png


Thanks in advance.

 

1 ACCEPTED SOLUTION
jppv20
Solution Sage
Solution Sage

Hi @alexa_0028 ,

 

You can create this measure:

Switch =
SWITCH(TRUE(),
SELECTEDVALUE('Static Table'[Code Name])="Italy",SELECTEDVALUE('Product Name Table'[Product_Name_IT]),
SELECTEDVALUE('Static Table'[Code Name])="Spanish",SELECTEDVALUE('Product Name Table'[Product_Name_ES]),
SELECTEDVALUE('Static Table'[Code Name])="German",SELECTEDVALUE('Product Name Table'[Product_Name_G]),
SELECTEDVALUE('Static Table'[Code Name])="English",SELECTEDVALUE('Product Name Table'[Product_Name_EN]))
 
Result:
jppv20_0-1634295903741.png

 

jppv20_1-1634295934067.png

 

Jori

 

If I answered your question, please mark it as a solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
alexa_0028
Resolver II
Resolver II

Hi @jppv20 

Thank you so much for your quick reply.
This solution worked like a charm for me. A big Kudos to you.

Thank you so much again !!

jppv20
Solution Sage
Solution Sage

Hi @alexa_0028 ,

 

You can create this measure:

Switch =
SWITCH(TRUE(),
SELECTEDVALUE('Static Table'[Code Name])="Italy",SELECTEDVALUE('Product Name Table'[Product_Name_IT]),
SELECTEDVALUE('Static Table'[Code Name])="Spanish",SELECTEDVALUE('Product Name Table'[Product_Name_ES]),
SELECTEDVALUE('Static Table'[Code Name])="German",SELECTEDVALUE('Product Name Table'[Product_Name_G]),
SELECTEDVALUE('Static Table'[Code Name])="English",SELECTEDVALUE('Product Name Table'[Product_Name_EN]))
 
Result:
jppv20_0-1634295903741.png

 

jppv20_1-1634295934067.png

 

Jori

 

If I answered your question, please mark it as a solution to help 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.