title: Why is my Flux query in Grafana not sorting by default?
body: <p>Grafana 7.5.1 with InfluxDB 1.8.2. I'm trying to create a table that displays a sum of the &quot;units&quot; values for each distinct tag value. I am getting the data, but I need the sums to be sorted in descending order by default. This is my Flux query:</p>
  <pre><code>    from(bucket: &quot;consumption&quot;) 
      |&gt; range(start: -1y) 
      |&gt; filter(fn: (r)  =&gt; r._measurement == &quot;stuff&quot; and r._field == &quot;units&quot; and r._value &gt; 0) 
      |&gt; group(columns: [&quot;dc&quot;,&quot;tnt&quot;]) 
      |&gt; sum(column: &quot;_value&quot;)
      |&gt; sort(columns: [&quot;_value&quot;], desc: true)
      |&gt; map(fn: (r) =&gt; ({r with _value: r._value / 4.0}))
      |&gt; yield()
  </code></pre>
  <p>I also have a Reduce transformation (Calculations --&gt; Total) and Organize Fields transformation.</p>
  <p>But no matter what I do in the sort function, it doesn't change anything in the table. The table is just always sorted alphabetically by the tag values (&quot;dc&quot;, &quot;tnt&quot;). I need it to be sorted by _value descending. What am I doing wrong?</p>
  <p>Thanks!</p>