Pivot with key value or melt

I have a set of rows that I want to turn into a line chart with multiple lines like this:
- x-axis is dates (done)

- y-axis is values (done)

- there are 3 lines, one for each value of "subject id" (i can't do this)

 

Is there a way to pivot / melt this table in the explore menu so that subject ID becomes three columns, one for each distinct value, and the column holds the "value" column. I think I could do this by making a derived table where the entire subject ID column is pivoted out, but that seems like a hacky solution for a very simple function (adding color to a plot)

 

"value" column holds floating point numbers, redacted for privacy. 

Screenshot 2023-12-05 at 12.14.04 PM.png

Solved Solved
0 2 444
1 ACCEPTED SOLUTION

Try converting the value field into a measure and then pivot on Subject ID.

View solution in original post

2 REPLIES 2

Try converting the value field into a measure and then pivot on Subject ID.

this worked. thank you

Top Labels in this Space