3 Replies Latest reply on Jan 6, 2014 11:19 AM by Aaron Clancy

    sort by dynamic field value

    Karl Hahn

      Hello,

       

      I have a list of events and would like them sorted in a particular order. The order will change each day in an unknown way. I see that I may sort by an aggregation of a field but not the value itself, which is what I'd like to do. Is there another way to accomplish this?

       

      Thanks!

        • 1. Re: sort by dynamic field value
          Tracy Rodgers

          Hi Karl,

           

          Can you post an example of what you'd like to see?

           

          -Tracy

          • 2. Re: sort by dynamic field value
            Karl Hahn

            Hi Tracy,

             

            Say I have two tables:

             

            Table A with fields id, toolname_1, toolname_2

            Table B with fields id, toolname, toolindex

             

            In a visualization, I would like to use A.toolname_1 and A.toolname_2 as dimensions. I would like those dimensions to be sorted by B.toolindex. My current sort options are by data source order, alphabetically, an aggregation of a field, or a manual static list. None of these 4 is suitable to the requirement. I think I'd like to sort by a field value directly, not its aggregation. Is it possible?

             

            Please let me know if the question is unclear. Thanks!

            • 3. Re: sort by dynamic field value
              Aaron Clancy

              Your visualization is an expression of aggregate data.  if your viz is showing the lowest level of detail then the application of a sort by an aggregated field is moot point. 

              If a mark on your viz is populated by one record or multiple records with the same toolindex then a min, max or attr will work just fine.

              If the marks are made up of records with varying toolindex values then the toolindex field doesn't make any sense in regards to sorting.