Forum Discussion
Pivot/unpivot or group!
Hi All
I have a data set that spits out and I know I can either use grouping or pivoting but I am stuck
Table 1 products.
Comes out like this;
| SubmissionID | EntryID | Product | Field | Column | Value |
| 123 | 3500 | Apples | Bin | 0 | |
| 123 | 3501 | Apples | Quantity | 0 | 35 |
| 123 | 3502 | Apples | Bin | 1 | |
| 123 | 3503 | Apples | Quantity | 1 | 109 |
| 123 | 3504 | Apples | Bin | 2 | |
| 123 | 3505 | Apples | Quantity | 2 | 144 |
i need to look like this
| SubmissionID | Product | Bin | Quantity | Kilos |
| 123 | Apples | 36 | 2210 | |
| 123 | Bananas | 12 | 2280 | |
Table 2
| FORM ID | EntryID | Name | Value |
| 123 | 3486 | Date out | 11/26/2024 00:00:00 |
| 123 | 3487 | DateIn | 9/11/2024 0:00 |
| 123 | 3488 | ReceivalNo | 999999 |
| 123 | 3489 | ID | 1 |
| 123 | 3490 | Name | Lisa |
| 123 | 3491 | Location | Action |
| 123 | 3492 | Test | Test |
| 123 | 3493 | Size | |
| 123 | 3494 | Comment |
Need to reformat to;
| FORM ID | Date out | DateIn | ReceivalNo | ID | Name | Location | Test | Size | Comment |
| 123 | 11/26/2024 00:00:00 | 9/11/2024 0:00 | 999999 | 1 | Lisa | Action | Test | ||
Table 3
| SubmissionID | EntryID | Index | Group | RowType | Column | Value |
| 123 | 3495 | 0 | People | TableFieldEntry | LaborType | Supervisor |
| 123 | 3496 | 0 | People | TableFieldEntry | Name | TEST |
| 123 | 3497 | 0 | People | TableFieldEntry | Number of People | 1 |
| 123 | 3498 | 0 | People | TableFieldEntry | Start | 11/26/2024 02:45:00 |
| 123 | 3499 | 0 | People | TableFieldEntry | Finish | 11/26/2024 07:00:00 |
| 123 | 3538 | 1 | People | TableFieldEntry | LaborType | Supervisor |
Outcome
| SubmissionID | LaborType | Name | Number of People | Start | Finish |
| 123 | Supervisor | TEST | 1 | 11/26/2024 02:45:00 | 11/26/2024 07:00:00 |
| 123 | Supervisor | TEST | 1 | 11/26/2024 02:45:00 | 11/26/2024 07:00:00 |
Can someone assist kindly 🙂
2 Replies
- lbendlinSuper User
Your sample data does not match the expected outcome.
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided. - AnonymousNot applicable
Hi Babycakes_00 ,
Did you solve your problem in these days?
If not, please provide us with more detailed sample data as lbendlin said, thanks.
If your problem has been solved, we would be happy to see your sharing with solution.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.