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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Super User
Super User

Hi, Please paste sample data and the expected result.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors