<?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: Bar chart sorting by expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1588575#M43111</link>
    <description>&lt;P&gt;Use this expression&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Match(Only({1} Hotel),
'B Hotel',
'Barcelona Universal',
'Hotel 1898',
'Hotel Europark',
'Hotel Gran Vía',
'Hotel Jazz',
'Hotel Paral.lel',
'Hotel REC Barcelona',
'Hotel SOHO Barcelona',
'Hotel The Corner',
'Midtown Apartments',
'U232 Hotel')&lt;/LI-CODE&gt;&lt;P&gt;And move the sorting for Hotel above NumberOfChecklists under Sorting&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13233iF5D3BA00598A1123/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jun 2019 12:20:54 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-06-05T12:20:54Z</dc:date>
    <item>
      <title>Bar chart sorting by expression</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1586571#M42922</link>
      <description>&lt;P&gt;Hi Community!&lt;/P&gt;&lt;P&gt;I am currently stuck with an issue that does not suppose to be so difficult.&lt;/P&gt;&lt;P&gt;I want to sort dimensions in a bar chart by an expression and did several trials. You can see my&amp;nbsp; bar chart in the image I uploaded. There I want the Hotel dimension to be sorted like this:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Match(Hotel,'B Hotel', 'Barcelona Universal', 'Hotel 1898', 'Hotel Europark', 'Hotel Gran Vía', 'Hotel Jazz', 'Hotel Paral.lel', 'Hotel REC Barcelona', 'Hotel SOHO Barcelona', 'Hotel The Corner', 'Midtown Apartments', 'U232 Hotel')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I set this formula in the custom expression field and did not work. It only sorted the legend.&lt;/P&gt;&lt;P&gt;My second trial was, following this video&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=bSN7z04pFqM" target="_self"&gt;Changing the sorting of a visualization using expressions - Qlik Sense,&lt;/A&gt;&amp;nbsp;&amp;nbsp;doing a much more elaborated formula:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If(Hotel = 'B Hotel',1, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'Barcelona Universal', 2, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'Hotel 1898', 3, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'Hotel Europark', 4, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'Hotel Gran Vía', 5, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'Hotel Jazz', 6, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'Hotel Paral.lel', 7, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'Hotel REC Barcelona', 8, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'Hotel SOHO Barcelona', 9, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'Hotel The Corner', 10, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'Midtown Apartments', 11, &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If(Hotel = 'U232 Hotel', 12))))))))))))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;It did´nt work either. My next step was to try an Inline table to do the job:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OrdenHoteles:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load * Inline [&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel, OrdenHotel&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;B Hotel, 1&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Barcelona Universal, 2&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel 1898, 3&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel Europark, 4&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel Gran Vía, 5&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel Jazz, 6&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel Paral.lel, 7&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel REC Barcelona, 8&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel SOHO Barcelona, 9&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel The Corner, 10&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Midtown Apartments, 11&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;U232 Hotel, 12&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Then I set the dimension&amp;nbsp;&lt;EM&gt;OrdenHotel&amp;nbsp;&amp;nbsp;&lt;/EM&gt;in the custom expression field, but Qlik Sense seemed to ignore it.&lt;/P&gt;&lt;P&gt;Finally I mapped the field &lt;EM&gt;Order&lt;/EM&gt; to the &lt;EM&gt;Hotel&lt;/EM&gt; tables and try to use it with the same result:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;OrdenHoteles:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Mapping&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load * Inline [&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel, OrdenHotel&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;B Hotel, 1&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Barcelona Universal, 2&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel 1898, 3&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel Europark, 4&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel Gran Vía, 5&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel Jazz, 6&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel Paral.lel, 7&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel REC Barcelona, 8&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel SOHO Barcelona, 9&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Hotel The Corner, 10&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Midtown Apartments, 11&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;U232 Hotel, 12&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IristraceCheckList:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Load&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;*,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;ApplyMap('OrdenHoteles',Hotel) as Orden&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Resident tmpIristraceCheckList;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Certainly I am not an expert in Qlik Sense, so it´s very likely that I omitted something.&lt;/P&gt;&lt;P&gt;Any help would be greatly grateful!&lt;/P&gt;&lt;P&gt;Kind Regards!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 10:12:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1586571#M42922</guid>
      <dc:creator>arodriguez_nyn</dc:creator>
      <dc:date>2019-05-30T10:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart sorting by expression</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1586603#M42925</link>
      <description>&lt;P&gt;I am not seeing any image, did you forget to attach one? Also, it might be easy if you are able to share a sample qvf to see the issue&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 12:13:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1586603#M42925</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-05-30T12:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart sorting by expression</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1588530#M43103</link>
      <description>&lt;P&gt;Hi Sunny:&lt;/P&gt;&lt;P&gt;Please find attached a very basic qvf file where I am still not able to customize the sort order &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 10:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1588530#M43103</guid>
      <dc:creator>arodriguez_nyn</dc:creator>
      <dc:date>2019-06-05T10:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart sorting by expression</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1588575#M43111</link>
      <description>&lt;P&gt;Use this expression&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Match(Only({1} Hotel),
'B Hotel',
'Barcelona Universal',
'Hotel 1898',
'Hotel Europark',
'Hotel Gran Vía',
'Hotel Jazz',
'Hotel Paral.lel',
'Hotel REC Barcelona',
'Hotel SOHO Barcelona',
'Hotel The Corner',
'Midtown Apartments',
'U232 Hotel')&lt;/LI-CODE&gt;&lt;P&gt;And move the sorting for Hotel above NumberOfChecklists under Sorting&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13233iF5D3BA00598A1123/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jun 2019 12:20:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1588575#M43111</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-06-05T12:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Bar chart sorting by expression</title>
      <link>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1588902#M43161</link>
      <description>Thanks Sunny! Moving the Hotel sorting was the key!</description>
      <pubDate>Thu, 06 Jun 2019 09:47:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bar-chart-sorting-by-expression/m-p/1588902#M43161</guid>
      <dc:creator>arodriguez_nyn</dc:creator>
      <dc:date>2019-06-06T09:47:00Z</dc:date>
    </item>
  </channel>
</rss>

