Good day,
I am trying to create a plot where my column names are on the x axis (see snip below), and the (filtered) values are on the y axis. I could do it in Excel. Any idea on how to do it in QuickSight?
I would suggest to transpose the table like
then you can use scen on x-axis and value on value
Ohk, that make sense. Thank you. And where would the transpose code be in sql Athena? I am not sure if one can transpose in QuickSight
Are the data in Athena like in you screenshot?
Yes, the untransformed data is in Athena
Without a column name for the first column?
But maybe something like
SELECT item, 'Scen1' AS scen, Scen1 AS value FROM your_table
UNION ALL
SELECT item, 'Scen2' AS scen, Scen2 AS value FROM your_table
UNION ALL
SELECT item, 'Scen3' AS scen, Scen3 AS value FROM your_table
UNION ALL
SELECT item, 'Scen4' AS scen, Scen3 AS value FROM your_table
UNION ALL
SELECT item, 'Scen5' AS scen, Scen3 AS value FROM your_table
ORDER BY item, scen;
will work
1 Like
Hello @Fractal !
Was @ErikG 's suggestion helpful, and if so could you mark their comment as a solution to help the community?
It has been some time since we have heard from you but would still like to help you find a solution. If we do not hear from you in the next 3 business days this post will be archived.