Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
bouyazbekj
Helper I
Helper I

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? 

1 ACCEPTED SOLUTION
Anonymous
Not 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

View solution in original post

1 REPLY 1
Anonymous
Not 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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors