I've been trying to move data from columns into rows with a new header for the rows. I have already figured out one way, however my method will work fine so far as the number of IDs are limited, thus if you look at my output I miss ID 4 & ID 5 for State 1 and so on.
Is there any way to modify this workflow to be dynamic and allow for it to increase the number of row headers based on the data?
The input and output data should look as shown below. I have also attached the workflow I've built which gets me this result.
Input

Current Output

Desired Output
