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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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