Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
263 views
in Technique[技术] by (71.8m points)

powerbi - RELATEDTABLE does not restrict to a single relation (link)

Generally table expansion happens towards the 1 side of a m:1 relationship. RELATED is used to fetch value from the 1 side. And RELATEDTABLE is used to fetch value from the m side. They work on either the 1 side or M side respectively. So either side of the same link.

I am facing a strange situation with a measure as explained: I have a date table with 1:M relationship between date table and product table. And 1:M with date table and sales table.

As per the concept, in a measure formula, when I use a SUMX(product..., here I can use RELATED to get value from the 1 side (date table). However it also allows me to do RELATEDTABLE and gives me access to the sales table. Example: SUMX(product...SUMX(RELATEDTABLE(sales), amt)....

How does it allow me to use RELATEDTABLE from product (measure) to access the sales table? Is RELATEDTABLE not restricted to the m side of the date and product table, and since product itself is the M side, RELATEDTABLE should not show any other table as there is no other M side to the link between date and product table.

Does it work like this instead: for each row of product, get the corresponding date from date table. Then for that date fetch the table of sales?

question from:https://stackoverflow.com/questions/66067495/relatedtable-does-not-restrict-to-a-single-relation-link

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...