There is a different order of rows in the matrix than in the actual table.... How to get the same order of rows in transposed table in the matrix and in the actual table?