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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Duplicate relationships and records

Good morning community, please need a help

I have the tables STOCK PRODUCTS, SUBGROUP, PRODUCTS. Where they have the following relationships:

1-STOCK PRODUCTS. Numeric Code (is the product id) related to PRODUCTS. CodigoNumerico

2-SUBGROUP. CodeGroup related to PRODUCTS. GroupCode

Captura.JPG

I also have a measure QUANTITY STOCK

Quantity Stock =
VWould Stock = SAt('Stock Products'[STOCKACTUAL])
RETURN
IF(ISBLONG(Stock), 0, Stock)

Then I put together a table with the PRODUCTS data. CodeNumber and the stock quantity measure

Captura1.JPG

The problem arises when I incopo a descipcion of the table SUBGROUP where when incoporarla are repeated n number of times (by the amount of (DescriptionGroup) the data CodigoNumerico

Captura2.JPG

Obviously there is something I am not interpreting about relationships.

I would appreciate your help please. Thank you!!!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Syndicate_Admin ,

Please update the formula of the measure [Cantidad Granel] and [Cantidad Stock] as below and check if they are what you want... You can find the details in the attachment.

Cantidad Granel = SUM('Illinois STOCK PRODUCTOS'[CANTIDADGRANEL])
Cantidad Stock =  SUM('Illinois STOCK PRODUCTOS'[STOCKACTUAL])

yingyinr_0-1663308722455.png

Best Regards

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @jtur ,

Is the field [Cantidad Stock] on the below table visual a measure or the aggregation value of value field? If it is a measure, could you please provide the related formula? In order to find the cause of problem and give you a suitable solution, could you please provide some sample data in your tables "STOCK PRODUCTS" , "SUBGROUP" and "PRODUCTS" (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

yingyinr_0-1662449363514.png

Best Regards

Good afternoon. Please need your help!!

Thank you

Anonymous
Not applicable

Hi @Syndicate_Admin ,

Please update the formula of the measure [Cantidad Granel] and [Cantidad Stock] as below and check if they are what you want... You can find the details in the attachment.

Cantidad Granel = SUM('Illinois STOCK PRODUCTOS'[CANTIDADGRANEL])
Cantidad Stock =  SUM('Illinois STOCK PRODUCTOS'[STOCKACTUAL])

yingyinr_0-1663308722455.png

Best Regards

mh2587
Super User
Super User

enabling filtering direction to both then try 


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Thanks for the prompt response but enable filtering address to both but continue the problem

Captura3.JPG

Also try to have both realations with filter addressing as both but the problem continues

Captura4.JPG

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.