Forum Discussion

bradbel's avatar
bradbel
Frequent Visitor
5 months ago
Solved

Feature Request: Matrix Visual

Posting about two (very specific) feature requests for Power BI Matrix visuals:   1. Total Row at Top: In Tabular Format, you cannot place the Total Row at the top of the table for whatever reason....
  • tharunkumarRTK's avatar
    5 months ago

    bradbel 

    Regarding the second feature, "Per-Value-Column Sorting with Calculation Items"

    I would like to suggest a workaround

     

    I have a Matrix visual with the “Continent” column placed in the Rows well, the “Time Calc” column (in this scenario column is taken from a calculation group table, however same workaround can be used even when the column is taken from a normal table) placed in the Columns well, and “Sales Amount” placed in the Values well, as shown below.

     

    I wanted to sort the Continents based on the QTD value in descending order.

    By default, the Matrix visual does not support per-value sorting. In this scenario, you can follow the trick below to achieve this.

    1. Create a a new DAX measure
      SortingMeasure =
      Var __CYRank = RANK(DENSE, ALLSELECTED(Customer[Continent]), ORDERBY(Sales[Sales Amount],DESC))
      Var __CalcItem = SELECTEDVALUE('Time Intelligence'[Ordinal],0)
      Var __ReturnOnlyIfCY = IF(__CalcItem = 3, __CYRank) // For QTD the ordinal value is 3
      Return __ReturnOnlyIfCY  ​
    2. Add this measure to the Matrix Values well
    3. Sort the Matrix visual based on SortingMeasure. 
    4. Once the desired sorting is achieved, it is very important to hide the sorting measure from the Matrix.
    5. Change the format string of SortingMeausre to Dynamic and use the following expression:
      UNICHAR(127)​

    This hides the value of the sorting measure.

    6. At the visual level, rename SortingMeasure, Sales Amount, and Continentto a blank space, and rename the Time Calc column to “Continent”.

     

    That’s it! You are now able to perform per-value sorting in a Matrix visual.

     

     

     

     

     

    Connect on LinkedIn

    you can read my blogs here: https://techietips.co.in

     

     








    Did I answer your question? Mark my post as a solution!
    If I helped you, click on the Thumbs Up to give Kudos.

    Proud to be a Super User!