<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Wrong X-Axis Order when Visualization is Put on Dashboard in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29112#M20869</link>
    <description>&lt;P&gt;@Debayan Mukherjee​&amp;nbsp;@Lindsay Olson​&amp;nbsp;I believe this is a bug in Databricks SQL. Could you please pass this on to second-level/next-level support?&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2022 12:34:41 GMT</pubDate>
    <dc:creator>Wout</dc:creator>
    <dc:date>2022-10-14T12:34:41Z</dc:date>
    <item>
      <title>Wrong X-Axis Order when Visualization is Put on Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29109#M20866</link>
      <description>&lt;P&gt;I have a visualization in which the X-axis values are displayed correctly in the Query Editor, in the order produced by the SQL query. However, when I add the visualization to a dashboard, the values are suddenly not sorted anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How is this possible? Is this is bug in the Databricks UI? How do I fix the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct (visualization in query editor):&lt;span class="lia-inline-image-display-wrapper" image-alt="correct"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1416iE7A742570ECB6800/image-size/large?v=v2&amp;amp;px=999" role="button" title="correct" alt="correct" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wrong (visualization on dashboard):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="wrong"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1405i6454778B2FC921B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="wrong" alt="wrong" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think this problem might be similar to &lt;A href="https://community.databricks.com/s/question/0D58Y00009AICBTSA5/order-by-disabled-in-sql-dashboard" target="test_blank"&gt;https://community.databricks.com/s/question/0D58Y00009AICBTSA5/order-by-disabled-in-sql-dashboard&lt;/A&gt;; unfortunately, that question does not have an answer.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2022 11:29:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29109#M20866</guid>
      <dc:creator>Wout</dc:creator>
      <dc:date>2022-10-05T11:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong X-Axis Order when Visualization is Put on Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29111#M20868</link>
      <description>&lt;P&gt;Hi @Debayan Mukherjee​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are correct in that the values displayed in the graph are the same. (E.g. the spike at "1 hour(s)" has the same value on the y-axis.) &lt;B&gt;I expect the x-axis values to be sorted in the order the SQL query returns them.&lt;/B&gt; When I view the visualization in the Query Editor, the x-axis values are sorted correctly, but when I view the same visualization on the dashboard, the x-axis values are sorted incorrectly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&amp;gt; By default, dashboards are sorted in reverse chronological order. You can reorder the list by clicking the column headings.&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not believe this quote is not relevant, as it talks about the order of dashboards in the dashboard list.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 09:39:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29111#M20868</guid>
      <dc:creator>Wout</dc:creator>
      <dc:date>2022-10-06T09:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong X-Axis Order when Visualization is Put on Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29112#M20869</link>
      <description>&lt;P&gt;@Debayan Mukherjee​&amp;nbsp;@Lindsay Olson​&amp;nbsp;I believe this is a bug in Databricks SQL. Could you please pass this on to second-level/next-level support?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 12:34:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29112#M20869</guid>
      <dc:creator>Wout</dc:creator>
      <dc:date>2022-10-14T12:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong X-Axis Order when Visualization is Put on Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29113#M20870</link>
      <description>&lt;P&gt;Absolutely, @Wout Maaskant​&amp;nbsp;! Thanks for commenting - the more voices, the better!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 16:20:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29113#M20870</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-14T16:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong X-Axis Order when Visualization is Put on Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29114#M20871</link>
      <description>&lt;P&gt;It was by going through Databricks Support that we got an answer to this question. I am reposting it here in case others run into the same issue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I researched and found that this is expected behaviour with sorting when added to the dashboard.&lt;/P&gt;&lt;P&gt;Unfortunately,&amp;nbsp;"ORDER BY"&amp;nbsp;is not supported in backend aggregation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This issue is being caused by new aggregation visualization. In the dashboard, backend aggregation is always used but backend aggregation doesn’t inherit the order by clause specified by the user. The workaround is to use X-axis sort in the visualization editor so the X-axis values are always sorted in the front end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although, We have a product feature ticket created to support it. there is no ETA at this moment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 09:44:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29114#M20871</guid>
      <dc:creator>Wout</dc:creator>
      <dc:date>2022-12-13T09:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong X-Axis Order when Visualization is Put on Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29115#M20872</link>
      <description>&lt;P&gt;We have further analyzed the visualization problem and found two solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The original visualization consists of 1 series and has aggregation enabled in the UI (but is unused, since the query itself aggregates already).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We found that the following two changes/workarounds solved the problem:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Adding a 2nd series that visualizes a constant that uses a window function that repeats the desired ordering: "max(0) OVER (ORDER BY binSortUnit, binSortValue ASC) as constantWindowFunction"&lt;/LI&gt;&lt;LI&gt;Disabling aggregation in the UI: in the visualization edit window, on the "General" tab, click on the three vertical dots next to "Y columns" and click on "Disable aggregations"&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second solution is the easier one, obviously.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="disable-aggregations"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1418i6F6B354981DA06E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="disable-aggregations" alt="disable-aggregations" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 13:47:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29115#M20872</guid>
      <dc:creator>Wout</dc:creator>
      <dc:date>2022-12-20T13:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong X-Axis Order when Visualization is Put on Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29110#M20867</link>
      <description>&lt;P&gt;Hi @Wout Maaskant​&amp;nbsp;, Could you please confirm what is the expectation regarding dashboard visualisation? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I compare one instance, lets say "1 hour(s)" then I see both the graphs are saying the same and the position is same (it is spiked), where as in 6 and 7 hours its the second highest spike. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default, dashboards are sorted in reverse chronological order. You can reorder the list by clicking the column headings.  But in the SQL dashboard I do not see it is in order. Is it what you are asking for? &lt;/P&gt;&lt;P&gt;(Ref: &lt;A href="https://docs.databricks.com/sql/user/dashboards/index.html#view-and-organize-dashboards" alt="https://docs.databricks.com/sql/user/dashboards/index.html#view-and-organize-dashboards" target="_blank"&gt;https://docs.databricks.com/sql/user/dashboards/index.html#view-and-organize-dashboards&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 07:58:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/wrong-x-axis-order-when-visualization-is-put-on-dashboard/m-p/29110#M20867</guid>
      <dc:creator>Debayan</dc:creator>
      <dc:date>2022-10-06T07:58:08Z</dc:date>
    </item>
  </channel>
</rss>

