Forum Discussion
powerbient
9 years agoFrequent Visitor
Create a Calculated Table from 4 separate tables
I am trying to calculate a table by getting columns from 4 different tables as listed in diagram. i am unable to get it through DAX queries i searched online like relatedtables, filter, add columns e...
powerbient
9 years agoFrequent Visitor
I found the problem and posting the solution here as i didnt get reply from anyone.
I used the following DAX query.
CalculatedTable = ADDCOLUMNS (
UserBranch,
"User", RELATED ( User[UserName]),
"Order", RELATED ( 'Order'[Ordernumber]),
"Branch", RELATED(Branch[BranchID])
)
it threw an error initially because the relationship from Branch to Order table was defined as Many to One rather than default value One to One. once i changed it , it worked perfectly.