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
BLM
Helper I
Helper I

Multiple relations

hi guys!! I have many tables with following relations:

 

relaciones.jpg

 

relaciones1.jpg

 

I am doing this table:

 

table.jpg

 

 

 

I'm not  able to obtain the correct result, I don't understand how to work with the inactive and active relationship.

help me, please

1 ACCEPTED SOLUTION

Thanks so much, If it Work i ‘ll tell you

View solution in original post

6 REPLIES 6
cthurston
Advocate II
Advocate II

I'm not exactly sure what you are asking, but I guess we can start with what IS the intended result?  Are their not supposed to be blank values?  Are the rows and columns correct?  Are you looking for a calculation? 

I would like obtain a matrix like photo.
Rows: Productos[prodcode]
Columns: calendar[fecha]
Values: sum off ‘cantidad from detcargas and ‘cantidad from ops.
The relations are in the image attached

I want obtain a matrix with dates from several tables.
"detcargas" contain the quantity of product that has been load in a determinate date.
"ops" contain the quantity of product that has been produced in a determinate date.
"Product" it's the table that contain all products of a factory, and "Calendar" is a calendar 🙂
The relations are:

productos[prodcodigo] with ops[op_producto_codigo]

productos[prodcodigo] with detcargas[dcarproducto]

calendar[fecha] with detcargas[dcarfecha_cam]

calendar[fecha] with ops[op_fecha_planificada]

my goal it's obtain a matrix that show the evolution the stock per day, for it, i need a matrix which rows will be all products from "table products", the columns will be a date range from "calendar table" and the values will be an acumulate sum from quantityes of products produced (ops) minus quantityes of product loaded (detcarga)

 

thank

Okay this is how I would solve this.  I would remove the inactive relationships and only relate tables in one direction.
Ex: 1 ->* and not bi directional.  This will speed up the performance of your report. 
Second I'd create a distinct Product Code Table (=Distinct('productos'[prodcodigo])) to relate to productos, ops, and decargas. 
Use the Products field in the product code table as the rows in your matrix.  That shoudl solve your circular dependancies.

Then use a measure as your value to something like SUM(detcargas[dcarproducto])-SUM(ops[op_producto_codigo]).

 

If that dosen't work i may need your pbix to try and solve it.

Thanks so much, If it Work i ‘ll tell you

it's work OK

 thank

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.