SOLVED
Join and Sum --- Join of 2 tables with having Sum of one column from table 2
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
LadyNaureen
7 - Meteor
‎06-18-2021
12:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Dear Community
Need your expert solution to following problem:
I have to join 2 tables - Employee and Employee_Expense with sum of one Expense_Amount column from Employee_Expense Table
EMPLOYEE
Employee_ID | Employee-Name | Department |
101 | John Doe | Finance |
102 | Jane Doe | Operations |
103 | Adam Patrick | Administration |
EMPLOYEE_EXPENSE
Employee_ID | Expense_Month | Expense_Year | General_Expense_Amount | Meal_Expense_Amount |
101 | April | 2021 | 36 | 100 |
101 | May | 2021 | 23 | 100 |
101 | May | 2021 | 70 | 500 |
102 | May | 2021 | 113 | 236 |
102 | May | 2021 | 313 | 678 |
103 | May | 2021 | 121 | 345 |
OUTPUT
Employee_ID | Expense_Month | Expense_Year | Total_General_Expense_Amount_May_2021 | Total_Meal_Expense_Amount_May_2021 | Total_Expense |
101 | May | 2021 | 93 | 600 | 693 |
102 | May | 2021 | 426 | 914 | 1340 |
103 | May | 2021 | 121 | 345 | 466 |
Output:
NOTE: I have pasted the output required in third sheet.
Thank you.
Regards,
LadyN
Solved! Go to Solution.
Labels:
- Labels:
- Developer
3 REPLIES 3
17 - Castor
‎06-18-2021
12:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @LadyNaureen,
To show you the output I needed to filter the data by May.
The truth is you don't need to have those two tables to receive this output but I believe you might be just starting with Alteryx so I have added a joining tool and the names of individuals to show you how to do that.
‎06-18-2021
01:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
17 - Castor
‎06-18-2021
01:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
