Hi I have a data here that has sum of debits and credits per id code. I want to spread out the values vertically.
Raw data:
IDCode | Period | Debit | Credit |
10001 | 1 | 50 | 100 |
10001 | 2 | 100 | 200 |
10001 | 3 | 300 | 400 |
10002 | 1 | 500 | 300 |
10002 | 2 | 300 | 200 |
10002 | 3 | 300 | 400 |
Expected Output:
1 | 2 | 3 | ||||
IDCODE | Sum of Debit | Sum of Credit | Sum of Debit | Sum of Credit | Sum of Debit | Sum of Credit |
10001 | 50 | 100 | 100 | 200 | 300 | 400 |
10002 | 500 | 300 | 300 | 200 | 300 | 400 |
I want to group it by period and presented the sum of debit and credit. Can you help me with this one pls?
@dunkindonut7777 Another way of doing this with the same column names for both Debit and Credit fields