Dear All,
I need help on calculating the counts from the rawdata based on conditions and then I need to insert the values in the summary table. Currently, I have the values stored in rawdata format and I need get the counts in the summary table.
Example:
Rawdata table
Name EmpID Q1 Q2 Q3
John 123 3 2 1
John 123 3 2 1
John 123 2 3 4
John 123 1 3 4
Adam 125 3 5 5
Adam 125 5 4 1
Adam 125 5 2 2
Summary Table
Name QID Question Count of (1) Count of (2) Count of (3) Count of (4) Count of (5)
John Q1 XXXXXXX 1 1 3 0 0
John Q2 YYYYYYY 0 2 2 0 0
John Q3 AAAAAA 2 0 0 2 0
Adam Q1 XXXXXXX 0 0 1 0 2
Adam Q2 YYYYYYY 0 1 0 1 1
Adam Q3 AAAAAA 1 1 0 0 1
Please let me know the best approach to get this task done. I can give more information if this is not clear.
TIA!
Cheers, DV