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
dokat
Post Prodigy
Post Prodigy

Linking Tables

Hi,

 

I have two tables that i am trying to link using common identifier and bring the corresponding values from one table to another. When i import the table and link with the common identifier (Product Hierarchy) and bring the corresponding Gross Sales it is summing up the total rather than bringing individual values. For Ex: Sump Pump 1 Gross Sales value should be $1,567,970 not total Sump Pump gross sales of  "$299,369,096 "What may cause this issue?

 

Product HierarchyGross SalesFranchise Sales
Sump Pump 1$299,369,0960
Sump Pump 2$299,369,096200
Sump Pump 3$299,369,0962520
Sump Pump 4$299,369,0961460
Sump Pump 5$299,369,0964160
Sump Pump 6$299,369,096-9740
Sump Pump 7$299,369,0960
Sump Pump 8$299,369,0960
Sump Pump 9$299,369,09685510
Sump Pump 10$299,369,09692420
Sump Pump 11$299,369,0960
Sump Pump 12$299,369,0960
Sump Pump 13$299,369,09695650
Sump Pump 14$299,369,09687380
Sump Pump 15$299,369,0960
Sump Pump 16$299,369,0960
Sump Pump 17$299,369,0960
Sump Pump 18$299,369,0960
Sump Pump 19$299,369,0960
Sump Pump 20$299,369,09635250
Sump Pump 21$299,369,09690010
1 ACCEPTED SOLUTION

Hi,

Please find attached the PBI file.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Some problem with the relationship.  To receive further help, share data in a format that can be pasted in an MS Excel file and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you Ashish.

There are two tables i am trying to link to. One is called "Smmary", second one is called Gross Sales. Output table will have Gross Sles right next to Franchise OIS where Calendar Year is 5/31/2023. I linked Product Hierarchy and Calendar year in both tables and setup many to one relationship. It doesnt allow many to many relationship. 

 

After linking tables it shows wrong numbers for Gross Sales.

 

Hope this clarifies.

Output Table

Calendar YearProduct HierarchyInvoice SalesGross Sales
5/31/2023Sump Pump 1-2$8,948
5/31/2023Sump Pump 256,324$5,082
5/31/2023Sump Pump 39,731$10,908
5/31/2023Sump Pump 46,230$85,625
5/31/2023Sump Pump 50$158,391
5/31/2023Sump Pump 60$113,247
5/31/2023Sump Pump 724$7,466
5/31/2023Sump Pump 80$99,211
5/31/2023Sump Pump 90$89,401
5/31/2023Sump Pump 10672$1,214,519
5/31/2023Sump Pump 11532$93,926
5/31/2023Sump Pump 120$31,913
5/31/2023Sump Pump 130$180,980
5/31/2023Sump Pump 14157,571$69,384
5/31/2023Sump Pump 154,833$161
5/31/2023Sump Pump 160$85,898
5/31/2023Sump Pump 172,848$279,286
5/31/2023Sump Pump 1825,425$12,516
5/31/2023Sump Pump 194,606($839)

 

Summary

Calendar YearP&LProduct Hierarchy Values
5/31/2022UnitsSump Pump 19                 1,161
5/31/2022UnitsSump Pump 20             478,981
5/31/2023Invoice SalesSump Pump 1$8,948
5/31/2023Invoice SalesSump Pump 2$5,082
5/31/2023Invoice SalesSump Pump 3$10,908
5/31/2023Invoice SalesSump Pump 4$85,625
5/31/2023Invoice SalesSump Pump 5$158,391
5/31/2023Invoice SalesSump Pump 6$113,247
5/31/2023Invoice SalesSump Pump 7$7,466
5/31/2023Invoice SalesSump Pump 8$99,211
5/31/2023Invoice SalesSump Pump 9$89,401
5/31/2023Invoice SalesSump Pump 10$1,214,519
5/31/2023Invoice SalesSump Pump 11$93,926
5/31/2023Invoice SalesSump Pump 12$31,913
5/31/2023Invoice SalesSump Pump 13$180,980
5/31/2023Invoice SalesSump Pump 14$69,384
5/31/2023Invoice SalesSump Pump 15$161
5/31/2023Invoice SalesSump Pump 16$85,898
5/31/2023Invoice SalesSump Pump 17$279,286
5/31/2023Invoice SalesSump Pump 18$12,516
5/31/2023Invoice SalesSump Pump 19($839)
5/31/2023Invoice SalesSump Pump 20$476,981

Gross Sales

Calendar YearProduct HierarchyGross SalesSegmentValues
5/31/2023Sump Pump 1Gross SalesHigh End$18,948
5/31/2023Sump Pump 2Gross SalesHigh End$15,082
5/31/2023Sump Pump 3Gross SalesHigh End$20,908
5/31/2023Sump Pump 4Gross SalesHigh End$95,625
5/31/2023Sump Pump 5Gross SalesHigh End$168,391
5/31/2023Sump Pump 6Gross SalesHigh End$123,247
5/31/2023Sump Pump 7Gross SalesHigh End$17,466
5/31/2023Sump Pump 8Gross SalesHigh End$109,211
5/31/2023Sump Pump 9Gross SalesHigh End$99,401
5/31/2023Sump Pump 10Gross SalesLow End$1,224,519
5/31/2023Sump Pump 11Gross SalesLow End$103,926
5/31/2023Sump Pump 12Gross SalesLow End$41,913
5/31/2023Sump Pump 13Gross SalesLow End$190,980
5/31/2023Sump Pump 14Gross SalesLow End$79,384
5/31/2023Sump Pump 15Gross SalesLow End$10,161
5/31/2023Sump Pump 16Gross SalesLow End$95,898
5/31/2023Sump Pump 17Gross SalesLow End$289,286
5/31/2023Sump Pump 18Gross SalesLow End$22,516
5/31/2023Sump Pump 19Gross SalesLow End$9,161
5/31/2023Sump Pump 20Gross SalesLow End$486,981

Hi,

Please find attached the PBI file.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you Ashish. I link the tables similar to what you did however Gross Sales outputs shows as sum. It doesnt show corresponding values for each brand.  Please see below

 

if it helps ic an share the .pbix file with you. Thanks

 

Link.pngOutput.png

Study my solution carefully over and over again before you give up.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Yes, i have been trying but the issue i am coming across is when i connect product hierarchy i cant establish Many to one relationship i thinks thats what causing the eror and there is no way around it.

 

Many to Many.png

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.