Grand Totals at the beggining in pivot tables

It's quite simple – I'd like to move the grand total from the last column to the first (or second) column in a table of rows when using pivot tables.

from this:
------------- | jan | feb | mar | total
category1 |
category2 |
category3 |

to this:
------------- | total | jan | feb | mar
category1 |
category2 |
category3 |

You would have to write an SQL Query for getting the results in your desired format -
where you create the columns dynamically filtered and grouped and totals section.
There's no functionality to edit pivot tables' formatting.
For more info contact -

Pivot tables are only available to simple and custom questions with summarized data. They don’t work for questions that lack aggregate data, and they don’t work for questions written in SQL, as Metabase would need to modify your SQL code in order to calculate subtotals

You can create pivot tables based on SQL questions, please check out this guide Creating pivot tables