Forum Discussion

Si_7777's avatar
Si_7777
Advocate II
1 year ago
Solved

Sorting matrix table

Watch numerous video but nothiong is really showing me how to do this in Power BI.   I have a simple Matrix per week number 1, 2, 3 etc then under the week a product name.  The the values of sales ...
  • danextian's avatar
    danextian
    1 year ago

    That is currently not supported. Sorting a matrix is either through a measure or row dimensions. You will need to add helper dimension from a disconnected table that returns the rank of those products by a measure.

     

    In the screenshot below, Rank is the Value column from the disconnected Ranks table which is just a generated table of possible rank numbers. 

     

    A virtual table is created to return the quantity by color and and the rank equivalent. SUMX is then use to return the filtered value from this virtual able according to the values in Rankx[Value] column. The matrix is now to be sorted by this rank dimension

    In the screenshot below, Quantity is still the same measure but rank has been replaced with a column with invisible values, and that column has been renamed to just  a blank space. The +- icon has also been toggled off.

     

    Please see the details in the sample pbix.