<?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 - User selection for chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sort-by-Expression-User-selection-for-chart/m-p/169196#M589172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to give the user the chance to decide whether he wants to sort by a calculated value or by the Dimension.&lt;/P&gt;&lt;P&gt;Therefor I created a Variable SortBy (Value;Name)&lt;/P&gt;&lt;P&gt;And use the expression:&lt;/P&gt;&lt;P&gt;if( SortBy = 'Value',&lt;/P&gt;&lt;P&gt;min(&lt;/P&gt;&lt;P&gt;if( CompFact &amp;gt; 0,&lt;/P&gt;&lt;P&gt;PRICE / ER_EUR / MP.CONV_F * CompFact,&lt;/P&gt;&lt;P&gt;PRICE / ER_EUR / MP.CONV_F&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;),&lt;/P&gt;&lt;P&gt;PRICE_CHART_LABEL&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;If I use the min() function alone it works. Using the dimension name as expression (here PRICE_CHART_LABEL) doesn't work. Neither the combination as shown above.&lt;/P&gt;&lt;P&gt;Any idea how to implement a user selection for sorting by expression or by dimension ?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 May 2010 11:47:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-28T11:47:08Z</dc:date>
    <item>
      <title>Sort by Expression - User selection for chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-by-Expression-User-selection-for-chart/m-p/169196#M589172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to give the user the chance to decide whether he wants to sort by a calculated value or by the Dimension.&lt;/P&gt;&lt;P&gt;Therefor I created a Variable SortBy (Value;Name)&lt;/P&gt;&lt;P&gt;And use the expression:&lt;/P&gt;&lt;P&gt;if( SortBy = 'Value',&lt;/P&gt;&lt;P&gt;min(&lt;/P&gt;&lt;P&gt;if( CompFact &amp;gt; 0,&lt;/P&gt;&lt;P&gt;PRICE / ER_EUR / MP.CONV_F * CompFact,&lt;/P&gt;&lt;P&gt;PRICE / ER_EUR / MP.CONV_F&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;),&lt;/P&gt;&lt;P&gt;PRICE_CHART_LABEL&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;If I use the min() function alone it works. Using the dimension name as expression (here PRICE_CHART_LABEL) doesn't work. Neither the combination as shown above.&lt;/P&gt;&lt;P&gt;Any idea how to implement a user selection for sorting by expression or by dimension ?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 11:47:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-by-Expression-User-selection-for-chart/m-p/169196#M589172</guid>
      <dc:creator />
      <dc:date>2010-05-28T11:47:08Z</dc:date>
    </item>
    <item>
      <title>Sort by Expression - User selection for chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-by-Expression-User-selection-for-chart/m-p/169197#M589173</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;Could it be that the true part of If function contains aggregation (min), but false part does not. Please try MINSTRING() for character dimension and MIN() for numbers.&lt;/P&gt;&lt;P&gt;Cheers Darius&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 12:06:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-by-Expression-User-selection-for-chart/m-p/169197#M589173</guid>
      <dc:creator>d_pranskus</dc:creator>
      <dc:date>2010-05-28T12:06:38Z</dc:date>
    </item>
    <item>
      <title>Sort by Expression - User selection for chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-by-Expression-User-selection-for-chart/m-p/169198#M589174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Darius,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for the quick reply. I tried but it doesn't work. By the way, the min() is only used because the chart has a second dimension. So what I I want to do: give the change to sort either by dimension 1 (Country) or by the min() of the all y-values, prices for different customers (dimension 2) in a country.&lt;/P&gt;&lt;P&gt;I tried with a simplified example with one dimension and a simple expression:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;x, y1, y2&lt;BR /&gt;a, 2, 4&lt;BR /&gt;b, 1, 4&lt;BR /&gt;c, 3, 2&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Chart:&lt;/P&gt;&lt;P&gt;Dimension = x, Expression = y1 * y2&lt;/P&gt;&lt;P&gt;Var: SortBy VarValues: (Name; Value)&lt;/P&gt;&lt;P&gt;Sort by expression:&lt;/P&gt;&lt;P&gt;if( SortBy = 'Value',&lt;BR /&gt;(y1 * y2),&lt;BR /&gt;x)&lt;/P&gt;&lt;P&gt;Doesn't work either. Each statement alone works...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 13:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-by-Expression-User-selection-for-chart/m-p/169198#M589174</guid>
      <dc:creator />
      <dc:date>2010-05-28T13:09:14Z</dc:date>
    </item>
    <item>
      <title>Sort by Expression - User selection for chart</title>
      <link>https://community.qlik.com/t5/QlikView/Sort-by-Expression-User-selection-for-chart/m-p/169199#M589175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian&lt;/P&gt;&lt;P&gt;you should be able to set the sort order by macro. Look for the automation examples when searching for *sortby*.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Juerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 14:31:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sort-by-Expression-User-selection-for-chart/m-p/169199#M589175</guid>
      <dc:creator />
      <dc:date>2010-05-28T14:31:37Z</dc:date>
    </item>
  </channel>
</rss>

