Forum Discussion
Anonymous
7 years agoNot applicable
Sum from other table
Hi,
I have 2 tables as follow:
How can I get the sum of purchase amount in Table 3?
| Table 1 | Table 2 | Table 3 | ||||||||||
| Customer | Date | Discount | Customer | Date | Purchase amount | Customer | Date | Discount | Purchase amount | |||
| A | 1/5/2019 | 10 | A | 1/5/2019 | 100 | A | 1/5/2019 | 10 | 150 | |||
| A | 3/5/2019 | 20 | A | 1/5/2019 | 20 | A | 3/5/2019 | 20 | 200 | |||
| B | 1/5/2019 | 5 | A | 1/5/2019 | 30 | B | 1/5/2019 | 5 | 100 | |||
| B | 2/5/2019 | 9 | A | 2/5/2019 | 40 | B | 2/5/2019 | 9 | 100 | |||
| C | 3/5/2019 | 10 | A | 3/5/2019 | 200 | C | 3/5/2019 | 10 | 100 | |||
| C | 6/5/2019 | 10 | B | 1/5/2019 | 100 | C | 6/5/2019 | 10 | 50 | |||
| D | 1/5/2019 | 1 | B | 2/5/2019 | 100 | D | 1/5/2019 | 1 | 50 | |||
| C | 1/5/2019 | 50 | ||||||||||
| C | 2/5/2019 | 100 | ||||||||||
| C | 3/5/2019 | 100 | ||||||||||
| C | 6/5/2019 | 50 | ||||||||||
| D | 1/5/2019 | 50 | ||||||||||
| D | 2/5/2019 | 100 | ||||||||||
check below:
1. Create a Date Table
Date Table = DISTINCT(Table2[Date])
2. Create Customers Table
Customers = DISTINCT(Table1[Customer])
3. Now, Create relationship like below.
4. Now, Use table visual to arrange the data.
1 Reply
- rocky09Solution Sage
check below:
1. Create a Date Table
Date Table = DISTINCT(Table2[Date])
2. Create Customers Table
Customers = DISTINCT(Table1[Customer])
3. Now, Create relationship like below.
4. Now, Use table visual to arrange the data.