Saturday, May 21, 2022
HomeBusiness IntelligenceFast Suggestions: Tips on how to Type Matrix by Column in Descending...

Fast Suggestions: Tips on how to Type Matrix by Column in Descending Order


How to Sort Matrix by Column in Descending Order

Immediately Microsoft launched Energy BI Desktop March 2020 which I hoped that it features a easy function on Matrix visible to have the ability to kind the Martix by column in descending order, however, it doesn’t. So, on this publish I shortly present you how one can kind Matrix by column in descending order.

Right here is the state of affairs. Considered one of my clients is constructing a report in Energy BI displaying gross sales by Yr, Month and Day of Week in a Matrix as beneath.

Sorting Matrix Visual in Power BI
Sorting Matrix Visible in Energy BI

All the things seems positive! However wanting on the Matrix sorting shortly reveals that such function is NOT accessible (YET). However the buyer want to see the Matrix sorted by Yr in descending order, one thing like this.

Sorting Matrix by Column Headers in Descending Order
Sorting Matrix by Column Headers in Descending Order

Right here is the answer which is tremendous easy.

  • Add a brand new “Yr” column, both in Energy Question or utilizing DAX. I take advantage of DAX simply to maintain it so simple as doable
MatrixSortDescYear="Date"[Year]
  • Add one other column which retains the order of the brand new “MatrixSortDescYear” in descending order like beneath:
MatrixSortDescYearOrder = -( 'Date'[Year] )
  • Type the primary column by the second
Power BI Desktop Sort Column by another Column
Energy BI Desktop Type Column by one other Column
  • Now put the “MatrixSortDescYear” in columns part in Matrix and take away earlier “Yr” column
Sort Matrix by Column in Descending Order

Voila! Straightforward, easy and neat!

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments

x