<?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: Sorting X Axis on Bar Chart not working properly in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sorting-X-Axis-on-Bar-Chart-not-working-properly/m-p/2485071#M101221</link>
    <description>&lt;P&gt;It's impossible to say without seeing your sort settings. But I would start by simplifying the expression, that contains multiple interpretations and formattings, and that could cause the problem.&lt;/P&gt;
&lt;P&gt;First, you should make sure that the timestamps are correctly interpreted in the script:&lt;BR /&gt;TimeStamp#(flight_operative_date,'YYYY-MM-DD hh:mm:ss') as flight_operative_date,&lt;BR /&gt;TimeStamp#(create_reservation,'YYYY-MM-DD hh:mm:ss') as create_reservation,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Then you can use the following, that will give the answer in hours and minutes:&lt;BR /&gt;Interval(flight_operative_date-create_reservation,'hh:mm:ss')&lt;/P&gt;
&lt;P&gt;or if you want it in decimal hours:&lt;BR /&gt;Num(24*(flight_operative_date-create_reservation),'#0.00','.',',')&lt;/P&gt;</description>
    <pubDate>Thu, 03 Oct 2024 08:44:12 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2024-10-03T08:44:12Z</dc:date>
    <item>
      <title>Sorting X Axis on Bar Chart not working properly</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-X-Axis-on-Bar-Chart-not-working-properly/m-p/2485063#M101219</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I'm stuck with a minor problem which i can't get through.&lt;/P&gt;
&lt;P&gt;I have this expression that calculates difference in hours between two fields and convert them in integer datatype:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Num(Num#(Interval(Date(Date#(flight_operative_date,'YYYY-MM-DD hh:mm:ss'),'YYYY-MM-DD hh:mm:ss')-Date(Date#(create_reservation,'YYYY-MM-DD hh:mm:ss'),'YYYY-MM-DD hh:mm:ss'),'hh')))&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;When i use this dimension along with a measure in a bar chart, the sort numerically, as well as sort by expression, do not work.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="DamianoD_0-1727943632740.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172485i14AEF3480DA01BAF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DamianoD_0-1727943632740.png" alt="DamianoD_0-1727943632740.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestion?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 08:22:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-X-Axis-on-Bar-Chart-not-working-properly/m-p/2485063#M101219</guid>
      <dc:creator>DamianoD</dc:creator>
      <dc:date>2024-10-03T08:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting X Axis on Bar Chart not working properly</title>
      <link>https://community.qlik.com/t5/App-Development/Sorting-X-Axis-on-Bar-Chart-not-working-properly/m-p/2485071#M101221</link>
      <description>&lt;P&gt;It's impossible to say without seeing your sort settings. But I would start by simplifying the expression, that contains multiple interpretations and formattings, and that could cause the problem.&lt;/P&gt;
&lt;P&gt;First, you should make sure that the timestamps are correctly interpreted in the script:&lt;BR /&gt;TimeStamp#(flight_operative_date,'YYYY-MM-DD hh:mm:ss') as flight_operative_date,&lt;BR /&gt;TimeStamp#(create_reservation,'YYYY-MM-DD hh:mm:ss') as create_reservation,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Then you can use the following, that will give the answer in hours and minutes:&lt;BR /&gt;Interval(flight_operative_date-create_reservation,'hh:mm:ss')&lt;/P&gt;
&lt;P&gt;or if you want it in decimal hours:&lt;BR /&gt;Num(24*(flight_operative_date-create_reservation),'#0.00','.',',')&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 08:44:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sorting-X-Axis-on-Bar-Chart-not-working-properly/m-p/2485071#M101221</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2024-10-03T08:44:12Z</dc:date>
    </item>
  </channel>
</rss>

