<?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 Sort by expression not working in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sort-by-expression-not-working/m-p/1805330#M65454</link>
    <description>&lt;P&gt;I was trying to sort by expression for my dimension Diabetes Range having four value like Normal predicates,Diabetes and High diabetes using sort by expression&amp;nbsp;&lt;/P&gt;&lt;P&gt;if([Diabetes Range]='Normal',1,if( [Diabetes Range]='Prediabetes',2, if( [Diabetes Range]='Diabetes',3,if( [Diabetes Range]='High Diabetes',4 ) ) ) )&lt;/P&gt;&lt;P&gt;its working for line chart but not for bar chart . How to resolve&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bar Chart.PNG" style="width: 257px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54297i32EE16484D8D7893/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bar Chart.PNG" alt="Bar Chart.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 May 2021 10:46:37 GMT</pubDate>
    <dc:creator>NVerma</dc:creator>
    <dc:date>2021-05-05T10:46:37Z</dc:date>
    <item>
      <title>Sort by expression not working</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-by-expression-not-working/m-p/1805330#M65454</link>
      <description>&lt;P&gt;I was trying to sort by expression for my dimension Diabetes Range having four value like Normal predicates,Diabetes and High diabetes using sort by expression&amp;nbsp;&lt;/P&gt;&lt;P&gt;if([Diabetes Range]='Normal',1,if( [Diabetes Range]='Prediabetes',2, if( [Diabetes Range]='Diabetes',3,if( [Diabetes Range]='High Diabetes',4 ) ) ) )&lt;/P&gt;&lt;P&gt;its working for line chart but not for bar chart . How to resolve&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bar Chart.PNG" style="width: 257px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54297i32EE16484D8D7893/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bar Chart.PNG" alt="Bar Chart.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 10:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-by-expression-not-working/m-p/1805330#M65454</guid>
      <dc:creator>NVerma</dc:creator>
      <dc:date>2021-05-05T10:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sort by expression not working</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-by-expression-not-working/m-p/1805353#M65457</link>
      <description>&lt;P&gt;I tried to replicate your issue, but I get the expected result. It looks like it is sorting from high to low value. Can you share some data or app so I can test it with your datamodel or data? If you want always to sort in this order it is better to move this to the script.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="eddie_wagt_0-1620214038069.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/54308i2743A6EE5DF9C675/image-size/medium?v=v2&amp;amp;px=400" role="button" title="eddie_wagt_0-1620214038069.png" alt="eddie_wagt_0-1620214038069.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 11:29:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-by-expression-not-working/m-p/1805353#M65457</guid>
      <dc:creator>eddie_wagt</dc:creator>
      <dc:date>2021-05-05T11:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sort by expression not working</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-by-expression-not-working/m-p/1805367#M65463</link>
      <description>&lt;P&gt;Hi Eddie,&lt;/P&gt;&lt;P&gt;Thanks for response&lt;/P&gt;&lt;P&gt;Actually i have one Dimension i.e Diabetes Range and measure i.e count(member id) so sorting for measure is default i.e auto and for Dimension i am using that if condition but not sure why its not working at my side. sorry for data sharing part as its client secure data cant share with you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried below logic to transfer this at load script side&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(TEST_RSLT &amp;lt; 5.7, dual('Normal', 1)&lt;/P&gt;&lt;P&gt;,if(TEST_RSLT &amp;gt;= 5.7 and TEST_RSLT &amp;lt; 6.4 , dual( 'Prediabetes', 2)&lt;/P&gt;&lt;P&gt;,if(TEST_RSLT &amp;gt;= 6.4 and TEST_RSLT &amp;lt; 9, dual( 'Diabetes', 3)&lt;/P&gt;&lt;P&gt;,if(TEST_RSLT &amp;gt;= 9, dual('High Diabetes', 4)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;)))) as "Diabetes Range"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so that i can short on numeric still not working . Is something default sorting is there which i am by mistake using ?&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 12:07:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-by-expression-not-working/m-p/1805367#M65463</guid>
      <dc:creator>NVerma</dc:creator>
      <dc:date>2021-05-05T12:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sort by expression not working</title>
      <link>https://community.qlik.com/t5/App-Development/Sort-by-expression-not-working/m-p/1805455#M65475</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/134382"&gt;@NVerma&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I don't understand why it is not working for you, as I know there are no defaults in sorting otherwise than you have override this setting by sorting by expression. You have to sort on the dimension..&lt;/P&gt;&lt;P&gt;Otherwise try this:&lt;/P&gt;&lt;P&gt;Try to bring Diabetes Range to another table like this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;YourOriginalTable:&lt;/P&gt;&lt;P&gt;LOAD ...&lt;/P&gt;&lt;P&gt;if(TEST_RSLT &amp;lt; 5.7,&amp;nbsp; 1)&lt;/P&gt;&lt;P&gt;,if(TEST_RSLT &amp;gt;= 5.7 and TEST_RSLT &amp;lt; 6.4 ,&amp;nbsp; 2)&lt;/P&gt;&lt;P&gt;,if(TEST_RSLT &amp;gt;= 6.4 and TEST_RSLT &amp;lt; 9, 3)&lt;/P&gt;&lt;P&gt;,if(TEST_RSLT &amp;gt;= 9,&amp;nbsp; 4)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;)))) as %DIABETES_RANGE_KEY&lt;/P&gt;&lt;P&gt;From ---&amp;nbsp;&lt;/P&gt;&lt;P&gt;Diabetes_range:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [%DIABETES_RANGE_KEY, Diabetes Range&lt;/P&gt;&lt;P&gt;1, Normal&lt;/P&gt;&lt;P&gt;2, Prediabetes&lt;/P&gt;&lt;P&gt;3, Diabetes&lt;/P&gt;&lt;P&gt;4, High Diabetes&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 13:19:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sort-by-expression-not-working/m-p/1805455#M65475</guid>
      <dc:creator>eddie_wagt</dc:creator>
      <dc:date>2021-05-05T13:19:09Z</dc:date>
    </item>
  </channel>
</rss>

