cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dnjtdjq
New Member

Question on using related function on virtual table

Hello Team,

 

I am playing around with Microsoft's sample Contoso Retail database and stuck with how the following expression works. 

 

Screenshot 2021-10-19 002600.png

 1. As first parameter to ADDCOLUMN'S function, I have used ALL(Sales) which is a virtual table. 

 2. All(Sales) doesn't have physical relationship with products table. 

 3. But I can use related function on All(Sales) to access the product[brand] column. 

 

However, if I substite ADDCOLUMN function's first paramemter to a table with subset of columns like the following, it produces an error stating that there is no relationship.

Screenshot 2021-10-19 003916.png

 

The codes are for my educational purposes and it wouldn't make much sense. 

What I am trying to understand is 

 1. related function works on the virtual table with all the columns and

 2. If I use only subset of columns for the virtual table, the related function does not work any more. 

 

I would really appreicate any help. 

1 REPLY 1
Icey
Community Support
Community Support

Hi @dnjtdjq ,

 

Based on my test, even if you put all columns into ALL() function, it will also not work.

 

all.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.