Forum Discussion

anish610's avatar
anish610
Frequent Visitor
3 years ago

How to sort matrix based on year column in matrix (Columns are coming from date[Date])?

I am not able to sort volume in the below table by Year 2021.

Year column is date column coming from in Date table.
I dont want to change the stucture of the visual. Is there any other way so that user can click on year and sort volumne for that year? 
I will like to know if any other custom visual be used to implement this feature.

7 Replies

  • bsheffer's avatar
    bsheffer
    Icon for Continued Contributor rankContinued Contributor

    you can't, but if you move the year to the rows and amount to the values you can filter to a specific year and then you can sort the amount high to low.

     

    I'd turn stepped layout off in row header options so your years have their own column.

     

     

    • anish610's avatar
      anish610
      Frequent Visitor

      Ya but we dont want to change the position of dates from columns

    • lbendlin's avatar
      lbendlin
      Icon for Super User rankSuper User

      Create another calculated(!) column that sums up the 2021 numbers.  Add that column to the visual. Sort by that column. Hide the column by making it very narrow and disabling word wrap.

       

      Sounds like a hack? Yep, it's a hack. And not a pretty one.

      • anish610's avatar
        anish610
        Frequent Visitor

        but it should this is a hardwire solution right? 
        because user can select to sort the visual by any year/month/week if the date hierachy. 
        How will it work then?

        It seem be very simple request to sort values by column. But seems difficult in power BI. 
        I hope there is a solution for this.

         

  • R00's avatar
    R00
    Frequent Visitor

    plz let me know if you found solution. I am going through same issue with my report.