The Join function synchronizes two data sources by starting a joined iteration on both of them. One of the data sources is called a parent-data-source and the other one a child-data-source. When a new record is received from the parent data source, join function iterates through the child data source until a condition is satisfied.
In the following example, a list of departments each employee worked in is created:
Note:
• | The above example is part of the JoinSample.dax document, located in the Samples/Job Samples folder. |
Output:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns:root xmlns:ns="http://www.tempuri.org/XML">
<ns:emp first-name="John" last-name="Brown" department="Accounting"/>
<ns:emp first-name="John" last-name="Brown" department="Sales"/>
<ns:emp first-name="John" last-name="Brown" department="Development"/>
<ns:emp first-name="John" last-name="Brown" department="Accounting"/>
<ns:emp first-name="Mary" last-name="Jane" department="Accounting"/>
<ns:emp first-name="Mary" last-name="Jane" department="Sales"/>
<ns:emp first-name="Mary" last-name="Jane" department="Development"/>
</ns:root>