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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
1234Chris
Regular Visitor

Help with selectcolums / relatedtable / filter

I've read for a while now but keep going around in circles to what seems a simple problem and probably is, so sorry for my simple mind not working.

 

Master Table with unique customer referrence 'UCR' column  (and a few others but not important maybe)

 

Customer Table with unique customer referrence UCR , NAME, Text (3 Columns only)

 

Customer Table many to one relationship with Master Table.

 

In the Master Table I want to add a column from Customer Table where the UCR match, filtered to display data from the Text Column only if the Name matches a specific text that I can select.

 

PowerBI - Filter - Helppng.png

 

So I tried : 'aaa' = FILTER(RELATEDTABLE(Customer Table),Customer Table[NAME] = aaa)

 

But get error.... multiple columns .... scalar vaule

1 ACCEPTED SOLUTION
ahmetyilmaz
Advocate II
Advocate II

Hi, below are the measures I created for Master,

ahmetyilmaz_0-1741639085786.png

 

aaa = LOOKUPVALUE(customer_table[Text],
                  customer_table[UCR], SELECTEDVALUE(master_table[UCR]),
                  customer_table[Name], "aaa")
 
bbb = LOOKUPVALUE(customer_table[Text],
                  customer_table[UCR], SUM(master_table[UCR]),
                  customer_table[Name], "bbb")
 
ccc = LOOKUPVALUE(customer_table[Text],
                  customer_table[UCR], SELECTEDVALUE(master_table[UCR]),
                  customer_table[Name], "ccc")

 

Remember to select this to also display empty rows.

 

ahmetyilmaz_1-1741639169288.png

 

 

View solution in original post

3 REPLIES 3
1234Chris
Regular Visitor

Hi Ahmetyilmaz, thank you for your assistant, this has worked.

ahmetyilmaz
Advocate II
Advocate II

Hi, below are the measures I created for Master,

ahmetyilmaz_0-1741639085786.png

 

aaa = LOOKUPVALUE(customer_table[Text],
                  customer_table[UCR], SELECTEDVALUE(master_table[UCR]),
                  customer_table[Name], "aaa")
 
bbb = LOOKUPVALUE(customer_table[Text],
                  customer_table[UCR], SUM(master_table[UCR]),
                  customer_table[Name], "bbb")
 
ccc = LOOKUPVALUE(customer_table[Text],
                  customer_table[UCR], SELECTEDVALUE(master_table[UCR]),
                  customer_table[Name], "ccc")

 

Remember to select this to also display empty rows.

 

ahmetyilmaz_1-1741639169288.png

 

 

Hi, just trying to do the same but rather than a measure have the output as a new column ??? no error is displayed if I create a new column using your reply however also no information displayed in the column ?? hate to ask again but if you are able to assist?

 

I have managed to use Lookupvalue but by adding a column to Customer Table from Master Table .. guess due to Customer Table having UCR repeated and UCR is uniquie in Master Table. However Ideally I would need to add columns into the Master Table ???   In this direction Lookupvalue did not require selectedvalue . so going to keep trying.

 

Found it 🙂   SUMX(Filter ........    

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.