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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
mincii
New Member

How to connect two tables with having the foreign keys twice in the table?

Dear Community

I am stucking into one problem to create new measures with project number.  I have a Project table containg a information about projects. One table with delivery note with project_from and project_to. This delivery note has a linked table with all position containg. 

Each Position has a quantity - and I want to put_from project an project_to an plus. But I just have the delivery note type as number 3. 

My Measure: 

Anzahl_N = IF (deliverynote = 3) , SUM(PROJ_NWP[ANZAHL]) * (-1.0), SELECTEDVALUE(PROJ_NWP[ANZAHL]))
 All Project in both columns do the minus, but I want to separate it.

Does anyone have an idea? If needed sample data I am going to paste it here.

 

Thanks. 

 

BR

2 REPLIES 2
mincii
New Member

mincii_0-1688459325528.png

 

mincii_1-1688459379695.pngmincii_2-1688459419139.png

 

 

Expected Results:

 

If  "Lieferscheintyp =3" than "Anzahl" should be for the "VonProject" minus Quantity and for the "AnProject " plus quantaty. 

 

Backround: The products are going to be send to different locations, so I have to figure out, where the goes away and where it come to which project. 

 

Hopefully I explained it clearly. 

 

Thanks

 

BR

BR 

serpiva64
Solution Sage
Solution Sage

Hi, Please paste sample data and the expected result.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors