<?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: Custom Sort Dimension based on Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497026#M185833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiii,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create one field with the above if statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then add that field into dimention and write expression in the Sort tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for Example:&lt;/P&gt;&lt;P&gt;if([New_Field] = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;High school&lt;/SPAN&gt;',1,&lt;/P&gt;&lt;P&gt;if([New_Field] = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Middle School&lt;/SPAN&gt;',2,&lt;/P&gt;&lt;P&gt;if([New_Field] = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;College&lt;/SPAN&gt;',3,&lt;/P&gt;&lt;P&gt;if([New_Field] = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Other&lt;/SPAN&gt;',4))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Nov 2013 05:19:20 GMT</pubDate>
    <dc:creator>nilesh_gangurde</dc:creator>
    <dc:date>2013-11-27T05:19:20Z</dc:date>
    <item>
      <title>Custom Sort Dimension based on Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497025#M185832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi - I have created a formula under dimension, like,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if( [Education] = 'Middle School' or [Education] = 'High School', 'High School and below', if( [Education] = 'College', 'College', 'Other'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I want to custom sort the defined 'High school and below', 'College', 'Other', how do I do that? I tried to add Expression under the Sort tab, but it doesn't take it. I tried =match( [Education], 'High school and below', 'College', 'Other')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 05:15:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497025#M185832</guid>
      <dc:creator />
      <dc:date>2013-11-27T05:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort Dimension based on Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497026#M185833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiii,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create one field with the above if statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then add that field into dimention and write expression in the Sort tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for Example:&lt;/P&gt;&lt;P&gt;if([New_Field] = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;High school&lt;/SPAN&gt;',1,&lt;/P&gt;&lt;P&gt;if([New_Field] = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Middle School&lt;/SPAN&gt;',2,&lt;/P&gt;&lt;P&gt;if([New_Field] = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;College&lt;/SPAN&gt;',3,&lt;/P&gt;&lt;P&gt;if([New_Field] = '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Other&lt;/SPAN&gt;',4))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 05:19:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497026#M185833</guid>
      <dc:creator>nilesh_gangurde</dc:creator>
      <dc:date>2013-11-27T05:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort Dimension based on Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497027#M185834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your script, inline load the values before the main data load using the same field name into a temp table. At the end of the load, drop the temp table. Qv remembers the first load order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmp_Education:&lt;/P&gt;&lt;P&gt;LOAD * Inline&lt;/P&gt;&lt;P&gt;[&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Education&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Middle school&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; High School&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; College&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Other&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... load model data here...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table tmp_Education;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now use original load order as the sort method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 05:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497027#M185834</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-11-27T05:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort Dimension based on Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497028#M185835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to QV... By creating a new field, I edited in script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Education,&lt;/P&gt;&lt;P&gt;if( [Education] = 'Middle School' or [Education] = 'High School', 'High School and below', if( [Education] = 'College', 'College', 'Other'))&lt;/P&gt;&lt;P&gt;as Education_new;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After reloading the data, I don't see the new field Education_new in the field list. What did I do wrong? Do I need to specify which file or table it comes from? I do have multiple tables connected with keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carol&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 07:39:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497028#M185835</guid>
      <dc:creator />
      <dc:date>2013-11-27T07:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort Dimension based on Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497029#M185836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you can create the new field exactly below the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Education]&lt;/SPAN&gt; field, so the new field will take data from the respective table i.e. the table in which &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Education]&lt;/SPAN&gt; field is present.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Example :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load Field_1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field_2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Education]&lt;/SPAN&gt;,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if( [Education] = 'Middle School' or [Education] = 'High School', 'High School and below', if( [Education] = 'College', 'College', 'Other'))&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;as Education_new&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;From TABLE_NAME;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-Nilesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 07:47:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497029#M185836</guid>
      <dc:creator>nilesh_gangurde</dc:creator>
      <dc:date>2013-11-27T07:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort Dimension based on Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497030#M185837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Education]&lt;/SPAN&gt; = &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;wildmatch( [Education] , 'Middle School' , 'High School'), 'High School and below', &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Education] &lt;/SPAN&gt;= wildmatch([Education] , 'College'), 'College', 'Other'))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 07:50:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497030#M185837</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-11-27T07:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Sort Dimension based on Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497031#M185838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I had loaded the table, I had to insert the if statement in the original Load script. I added the if statement to the end of the script, which was wrong. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Nov 2013 09:14:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Custom-Sort-Dimension-based-on-Expression/m-p/497031#M185838</guid>
      <dc:creator />
      <dc:date>2013-11-27T09:14:02Z</dc:date>
    </item>
  </channel>
</rss>

