Below I have a template table I am trying to fill out with the second table, my sample dataset which contains 80+ unique values for the Class field. I am wondering how could I achieve my desired output where the values under the field "Class" in my second table is grouped and shown as columns, and display the corresponding Amount for each Desc. Thanks in advance!
Template
Template1 |
a |
b |
c |
d |
e |
Sample dataset:
Class | Desc | Amount |
Apple | a | 1 |
Apple | c | 2 |
Apple | d | 3 |
Kiwi | b | 4 |
Kiwi | d | 5 |
Pineapple | a | 6 |
Pineapple | b | 7 |
Pineapple | c | 8 |
Pineapple | d | 9 |
Desired output:
Template1 | Apple | Kiwi | Pineapples |
a | 1 | 6 | |
b | 4 | 7 | |
c | 2 | 8 | |
d | 3 | 5 | 9 |
e |
Solved! Go to Solution.
@overhead_press
We can a join first then form the data by Cross tab, and Union with the left join.