It is possible to change the structure for your requirement using tableau prep or by using normal sql. Please find the below procedure.
Remove the Total Column while connecting the tableau prep to data source. After that in a parallel pipeline, use the group by transformation to calculate Total and then union the main source data and group by data.
Please let me know in case of any issues.
Please mark the answer as helpful and correct if it resolves your question.
For this you do need tableau prep, you can just delete the "TOTAL" column, this total you can get in Tableau itself.
It seems like this should require fewer steps (perhaps someone else has some ideas), but here's how I'd approach it.
Start by pivoting the Total column.
Next aggregate the pivoted fields.
This will result in one single record for the Total.
Rename the fields to Device and Value.
Next, insert a new branch from the source table and remove the Total field.
Finally, union it to the total data.
Result will look like this:
See attached workflow.
Flow.tfl 5.2 KB
Thank you Ken!
It helps a lot !