- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Relating different tables
Hello,
Would anybody know how to build this results table below using the product discount, customer and sales tables? How do you relate these 3 tables and what formula/statement to use? Thanks.
RESULTS TABLE
Customer# | Discount Level | Product # | Special Price |
Cust 1 | Bronze | B1 | $30 |
Cust 1 | Bronze | B3 | $5 |
Cust 2 | Gold | B2 | $100 |
Cust 2 | Gold | B1 | $10 |
Cust 3 | Silver | B3 | $3 |
PRODUCT DISCOUNT TABLE
Product # | Discount Level | Special Price |
B1 | Bronze | $30 |
B1 | Silver | $20 |
B1 | Gold | $10 |
B2 | Bronze | $150 |
B2 | Silver | $125 |
B2 | Gold | $100 |
B3 | Bronze | $5 |
B3 | Silver | $3 |
B3 | Gold | $1 |
CUSTOMER TABLE
Customer | Discount Type |
Cust 1 | Bronze |
Cust 2 | Gold |
Cust 3 | Silver |
SALES TABLE
Customer | Product # |
Cust 1 | B1 |
Cust 1 | B3 |
Cust 2 | B1 |
Cust 2 | B2 |
Cust 3 | B3 |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi,
Merge Table 2 into Table 3 based on the Customer column to bring over the Discount type column into Table 3. Merge Table 3 into Table 1 based on the Product # and Discount type column to bring over the Customer in Table 1. Now build all your visuals from Table 1.
Hope this helps.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Ashish_Mathur ,
Thank you for your quick reply. In merging table 3 into table 1, what do you mean by based on Product # AND Discount Type column? How do you achieve this merging using in a query, based on 2 columns? Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi,
In the Query Editor, select Merge queries and then select the common columns of both tables.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
11-09-2024 10:31 PM | |||
07-04-2024 11:07 PM | |||
09-27-2024 07:15 AM | |||
10-11-2024 10:15 AM | |||
09-25-2024 01:24 AM |
User | Count |
---|---|
88 | |
77 | |
58 | |
44 | |
38 |
User | Count |
---|---|
115 | |
81 | |
81 | |
52 | |
39 |