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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…