Video Ref: https://www.youtube.com/watch?v=mWCRJX6QRrs
- Relationships in Power BI usually connect tables with one-to-many or many-to-one cardinality; RELATED works from the many side to the one side, and RELATEDTABLE works the opposite way.
- RELATED is like a dynamic VLOOKUP that pulls a single value from a related table into the current table’s row context—for example, bringing a customer name into an orders table.
- RELATEDTABLE returns a table of all related rows from another table, useful for aggregation functions like COUNTROWS to count related records correctly.
- You can use RELATEDTABLE with iterator functions like SUMX or AVERAGEX to perform row-wise calculations and then aggregate results, such as computing total sales by multiplying quantity with amount for each order.
Summary
- In short, use RELATED to bring single values from the “one” side into the “many” side table, and use RELATEDTABLE to aggregate or iterate over related rows from the “many” side into the “one” side table.
- These help you build dynamic, accurate DAX calculations in your Power BI reports.
Comments
Post a Comment