<?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: Sort with expression trouble in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990750#M337576</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using the {1} to tell your sorting expression to not change based on any selection. But the problem is that you can not use it with bare field, you can only use it between functions such as Sum, Median, Avg, Only etc and having a bare field is equivalent to having a only next to it. So for instance :- FieldName = Only(FieldName), but with the Only(FieldName) you can use set analysis, but with FieldName you cannot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I just added this to your expression -&amp;gt; &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Only({1} Market_Data.Scenario)&lt;/STRONG&gt; anytime you had&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; Market_Data.Scenario&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 Oct 2015 21:27:43 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-10-03T21:27:43Z</dc:date>
    <item>
      <title>Sort with expression trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990746#M337572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a list box with an expression to list only certain field names.&amp;nbsp; I want that list to stay static (not resorted when selection is made).&amp;nbsp; I'm using the sort expression with the following formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Market_Data.Scenario='Actual',1,&lt;/P&gt;&lt;P&gt;if(Market_Data.Scenario=$(vCurLBEScenario),2,&lt;/P&gt;&lt;P&gt;if(Market_Data.Scenario=$(vPrevLBEScenario),3,&lt;/P&gt;&lt;P&gt;if(Market_Data.Scenario='Plan-16B',4,&lt;/P&gt;&lt;P&gt;if(Market_Data.Scenario='Standard-16',5,&lt;/P&gt;&lt;P&gt;if(Market_Data.Scenario='LBE_Feb',6,&lt;/P&gt;&lt;P&gt;if(Market_Data.Scenario='LBE_May',7,&lt;/P&gt;&lt;P&gt;if(Market_Data.Scenario='LBE_Aug',8,&lt;/P&gt;&lt;P&gt;if(Market_Data.Scenario='LBE_Nov',9)))))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If nothing is selected the order is acroding to this formula.&amp;nbsp; Once a selection is made the order changes.&amp;nbsp; I dont want that.&amp;nbsp; I do not have any other sort method selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 23:01:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990746#M337572</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-02T23:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with expression trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990747#M337573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please post sample app&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2015 23:35:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990747#M337573</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-10-02T23:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with expression trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990748#M337574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;=if(Only({1} Market_Data.Scenario)='Actual',1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only({1} Market_Data.Scenario)&lt;/SPAN&gt;=$(vCurLBEScenario),2,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only({1} Market_Data.Scenario)&lt;/SPAN&gt;=$(vPrevLBEScenario),3,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only({1} Market_Data.Scenario)&lt;/SPAN&gt;='Plan-16B',4,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only({1} Market_Data.Scenario)&lt;/SPAN&gt;='Standard-16',5,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only({1} Market_Data.Scenario)&lt;/SPAN&gt;='LBE_Feb',6,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only({1} Market_Data.Scenario)&lt;/SPAN&gt;='LBE_May',7,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only({1} Market_Data.Scenario)&lt;/SPAN&gt;='LBE_Aug',8,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Only({1} Market_Data.Scenario)&lt;/SPAN&gt;='LBE_Nov',9)))))))))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2015 00:10:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990748#M337574</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-03T00:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with expression trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990749#M337575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that's the answer.&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you describe what this does?&amp;nbsp; Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2015 01:23:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990749#M337575</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-03T01:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sort with expression trouble</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990750#M337576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are using the {1} to tell your sorting expression to not change based on any selection. But the problem is that you can not use it with bare field, you can only use it between functions such as Sum, Median, Avg, Only etc and having a bare field is equivalent to having a only next to it. So for instance :- FieldName = Only(FieldName), but with the Only(FieldName) you can use set analysis, but with FieldName you cannot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I just added this to your expression -&amp;gt; &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Only({1} Market_Data.Scenario)&lt;/STRONG&gt; anytime you had&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; Market_Data.Scenario&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2015 21:27:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-with-expression-trouble/m-p/990750#M337576</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-03T21:27:43Z</dc:date>
    </item>
  </channel>
</rss>

