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

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
v-yiruan-msft
Community Support
Community Support

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Good afternoon. Please need your help!!

Thank you

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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