I’m not sure you can rank across a whole table when using pivoted data, but you could achieve the same thing (a heatmap) by calculating the % of the grand total for each cell in the table.
Create a table calculation to calculate the grand total:
This approach also means that you can show the magnitudinal differences e.g. if rank 1 = 13,457, rank 2 = 212, rank 3 = 210 then showing the % of the grand total will reflect that rank 1 is significantly higher than rank 2 and rank 3.