Forum Discussion
Help with relationships
Hello everyone, not sure if this is something that you can help me with but thought I'd give it a shot.
Im trying to build a relationship based on how the query manager in SAP has them.
FROM OPCH T0
LEFT JOIN PCH1 T1 ON T0.[DocEntry]=T1.[DocEntry]
LEFT JOIN OITM T2 ON T1.[ItemCode]=T2.[ItemCode]
LEFT JOIN PDN1 T5 ON T1.[BaseEntry]=T5.[DocEntry] AND T1.BaseLine = T5.LineNum
LEFT JOIN OPDN T3 ON T3.[DocEntry]=T5.[DocEntry]
LEFT JOIN POR1 T7 ON T5.[BaseEntry]=T7.[DocEntry] AND T5.BaseLine = T7.LineNum
LEFT JOIN OPOR T6 ON T7.[DocEntry]=T6.[DocEntry]
LEFT JOIN OACT T8 ON T7.[AcctCode]=T8.[AcctCode]
LEFT JOIN OACT T9 ON T1.[AcctCode]=T9.[AcctCode]
/* WHERE T0.[DocType] = 'I' AND T2.[InvntItem] ='Y' */
WHERE T0.[DocDate] >= [%0] AND T0.[DocDate] <= [%1]
Can anyone help me with all the table/column relationships?
- Anonymous7 years ago
bouyazbekj,
You can create relationships among these tables using the join field you mentioned in above query, then drag required fields to table visual and use slicer/filter with DocDate field to slice the data based on Where conditions.
For more details about creating relationships in Power BI Desktop, please take a look at the following article.
https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships
Regards,
Lydia
1 Reply
- AnonymousNot applicable
bouyazbekj,
You can create relationships among these tables using the join field you mentioned in above query, then drag required fields to table visual and use slicer/filter with DocDate field to slice the data based on Where conditions.
For more details about creating relationships in Power BI Desktop, please take a look at the following article.
https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships
Regards,
Lydia