8 Replies Latest reply on Jan 29, 2018 11:49 PM by ABDULRAHMAN ALAMER

    how to sort a measure value column

    Shajid Tharammal

      Hi Team,

      how to sort a measure value column? the sorting icon not enabling when i click the column..your help highly appreciatedSort Descending.JPG

        • 1. Re: how to sort a measure value column
          Sankarmagesh Rajan

          Hi Shajid


          Select ctrl+a and then try sorting.


          attach workbook.




          • 2. Re: how to sort a measure value column
            Shajid Tharammal

            Dear Sankar,

            I tried it already..but doesn't work. the sort icon shows inactive.. see my previous attached



            • 3. Re: how to sort a measure value column
              Neeraj Rajpal

              Right click the Designation dimension


              Click on the Field in Sort by and select the Productivity measure value.


              And select the Sort Order.

              1 of 1 people found this helpful
              • 4. Re: how to sort a measure value column
                Shajid Tharammal

                Dear Neeraj, when i right click on 'designation' i can see this menu. there is no sorting option found. actually i need to sort the 'productivity' column.

                Btw..thank you for your answer




                • 5. Re: how to sort a measure value column
                  Ken Patton

                  Tableau never sorts Measures directly; it sorts Dimensions optionally based on the values of some Measure.


                  So in your case, I think you actually want to sort the Dimension called Code , descending by MAX(Productivity). Apply your Sort to the Code pill, and see if you can get what you wanted.


                  The only possible complication is that you're doing a lot of Data Blending, so that may or may not affect how this goes.

                  3 of 3 people found this helpful
                  • 6. Re: how to sort a measure value column
                    Matt Lutton

                    i agree with Ken here -- but blending can introduce complications.  Post a sample TWBX with a couple of blended sample data sources (can use Superstore Sales and/or Coffee Chain datasets that ship with Tableau to create a mocked up example).  This will allow others to interact with a similar view, and provide the best help possible for your scenario.


                    But Ken is right -- the main concept to understand here is that we sort Dimensions in Tableau by Measures -- we don't sort the Measures directly.

                    • 7. Re: how to sort a measure value column
                      Lena Grygoryev

                      This sorting of Dimensions by measure value workd in Tableau Desktop, but after the report is posted to Server, doesn't work. Any idea how to mae this sorting by measure values work in the Web published report?

                      • 8. Re: how to sort a measure value column
                        ABDULRAHMAN ALAMER

                        Please refer to this link. I believe it cover your concern.

                        Sort Options Not Available from Toolbar When Data Blending | Tableau Software




                        Published: 18 Jun 2013

                        Last Modified Date: 17 Jan 2018            


                        When using data blending, the computed sort options are not available (grayed out) from the toolbar.                    


                        Tableau Desktop                    


                        To resolve this issue try one of the following options:


                        Option 1: Apply a computed sort manually

                        1. In the Data window, right-click the relevant field.
                        2. Select Default Properties > Sort.
                        3. Change the default sort order of the field using the various options, and then click OK.

                        Option 2: Create a calculation for a more dynamic sort

                        1. In the secondary data source, select Data > Create Calculated Field.
                        2. In the Formula text box, create a calculated field that aggregates the measure you would like to sort on. For example, type SUM([COGS]).
                        3. Right-click the calculation you just created in step 2, and select Convert to Discrete
                        4. Drag the calculation to the left-most position in the Rows or Columns shelf.
                        5. Right click the calculation in the Rows or Columns shelf, and select Show Header to remove the selection

                        Note: By default, values will be sorted in ascending order. If you want to sort in descending order, add a minus symbol in front of the aggregated measure in the calculation. Open the attached packaged workbook to see this example.




                        When using data blending, the automatic sort options are not available (grayed out) for secondary dimensions.



                        Additional Information

                        • If the dimension is converted to an attribute, it is possible to use the computed sort options from the toolbar. To convert a dimension to an attribute, right-click the relevant dimension field in the Columns or Rows shelf, and select Attribute. For more information about attributes, refer to the "Aggregating Dimensions" section in the Aggregating Data topic in the Desktop Help.
                        • Community Forum: Sorting Blended Data



                        End of Quote