Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Sorting by a column not on a visual

I will first say that this needs fixed. The solution found here is just too annoying to be useful, there should be a simpler solution. As a note, the instructions in the article do not work if you are pulling from a shared data source as you don't have the option to go to the modeling tab and chose a column to sort by.

 

On that note:

I have created a table visualization to show counts. The problem is I need it sorted by a column not on the visual. Using the article I  defined a column to sort on. This works when the column is present when it's in the table, however when I pull the column from the table, the sort no longer works.

 

Can anyone let me know what I'm doing wrong?

 

Column On TableColumn Not On Table

 

Version: 2.79.5768.1082 64-bit (March 2020)

  • Hi, Anonymous 

    Do you have the right selection for the columns you want to sort?

     

    Here is the demo.

    Try  again follow these steps:

    1.make sure you have  selected column" ClosedMMYY_Display"  you want sort  in table view ,not other column

     

    Then sort column  "ClosedMMYY_Display"  by column "ClosedMMYY"

    The table visual will change as follows
    ("ClosedMMYY_Display"  have sorted  by column "ClosedMMYY"  in  ascending order now)

     

    What you need is to  reclick "ClosedMMYY_Display"  to sort column "ClosedMMYY_Display"  in  descending order

     

    you can also set it  in table visual options

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

8 Replies

  • Anonymous 

    The objective of the sort column is that you do not need to add that. I doubt your visual is not sorted on month year.  It is not defined correctly.

    In data view when Month Year is selected at that time column Close Month day should be sort column or should be selected as sort column

    • Anonymous's avatar
      Anonymous
      Not applicable

      I don't understand what you mean by the statement: "I doubt your visual is not sorted on month year" looking at the attached images, it obviously is not sorted correctly.

       

      When the sorting column is not present, it reverts to an alphabetic sort.

       

      Regardless, per the MS Article, I should be able to go to the modeling tab and choose a sort order when the column is not on the visual. As the modeling sort order is set to a column not on the visual, why isn't the visual sorting per the modeling tables sort? This table was created specifically for this example and I have not clicked on any column headings to force a different sort.

      • v-easonf-msft's avatar
        v-easonf-msft
        Community Support

        Hi , Anonymous 

        I can not determine the possible cause without specific test data .If you can share me some sample data ,it will be better .

         

        And here  is a  demo. It works well in my test.

         

        1.Usually a column is sorted by itself   (show as below)

         

        The table visual will also sort by the first field  applied in the table by defaul

        2.If  you click the column  "index"  and  make it short by  "Value"  in data view

        The table visual will sort by  "Value"  first   , then short by "Index"

         

          
        Even if you only reserved index field, it will still sort like this by default.

         

        You also can click "Value"  then shift +click "Index"  in a table visual   to achieve the same result.

        Therefore, please ensure that the data format is correct so that all fields themselves can be sorted correctly, and there is no error in sorting steps.

         

         

        Best Regards,
        Community Support Team _ Eason