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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
feralvarez994
Helper II
Helper II

Model relationship

Hi everyone! I have an issue here

 

I have 3 tables (Autos, Reserva, and LOG_RESER).

- In TABLE RESERVA i have every car booking/reservation (every booking has 1 key) with each Code of the car booked

- In TABLE AUTOS i have every car (booked, not booked, used as part of payment, not used as part of payment, etc) with the cost and everything else

- In LOG_RESER i have only the cars that were used as part of payment and the booking asociated

 

RESERVA (RE) & AUTOS (AT) are linked by the car code, each booking has one car linked (1 to * relationship in both direction, columns AT_COAUTO to RE_COAUTO)

Autos & LOG_RESER are linked also by the car code from AT_COAUTO to COD_AUTO (1 to 1 both directions)

 

The thing is that i have to bring the Cost of the COAUTO (find it in table AUTOS with AT_COSTO) that has been used as part of payment, so i can identify it in LOG_RESER table (RESERVA table only has the car code associated to the book, not to the part of payment), and that cost I have to subtract it from the total debt that the reservation has (it is in another column of the reservation table called DEUDA_TOTAL or TOTALDEBT)

 

Hope to be clear!

feralvarez994_0-1651868082526.png

 

1 REPLY 1
v-luwang-msft
Community Support
Community Support

Hi @feralvarez994 ,

Is it possible to show some template data, and the expected output? Remember to remove confidential data.

 

 

Best Regards

Lucien

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors