<?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 suming variables in expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373916#M576010</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw in a qlikview example "whats new in qlikview 11" that you could create "slect one metric" for sales, quantity, margin...etc.. &lt;/P&gt;&lt;P&gt;The way they did it:&lt;/P&gt;&lt;P&gt;MetricsOptions:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [_metricsNo, _metrics&lt;/P&gt;&lt;P&gt;1, Sales, &lt;/P&gt;&lt;P&gt;2, Qty,&lt;/P&gt;&lt;P&gt;3, Margin&lt;/P&gt;&lt;P&gt;4, Margin%&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MetricPickOne:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _metrics as _metricPickOne&lt;/P&gt;&lt;P&gt;RESIDENT MetricsOptions;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, if I wanted to sum up sales in a expression but don´t want to hardcode sum(sales) but instead wanted to use the Metrics Options, how do I do that? I tried sum(_metricPickOne) but that didn´t work.&lt;/P&gt;&lt;P&gt;I know I can use condition and say _metricPickOne = 'sales'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; than sum(sales) but what if I have more than 10 metrics? Is there another way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;alphez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Apr 2012 12:26:45 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-30T12:26:45Z</dc:date>
    <item>
      <title>suming variables in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373916#M576010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I saw in a qlikview example "whats new in qlikview 11" that you could create "slect one metric" for sales, quantity, margin...etc.. &lt;/P&gt;&lt;P&gt;The way they did it:&lt;/P&gt;&lt;P&gt;MetricsOptions:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [_metricsNo, _metrics&lt;/P&gt;&lt;P&gt;1, Sales, &lt;/P&gt;&lt;P&gt;2, Qty,&lt;/P&gt;&lt;P&gt;3, Margin&lt;/P&gt;&lt;P&gt;4, Margin%&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MetricPickOne:&lt;/P&gt;&lt;P&gt;LOAD DISTINCT &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _metrics as _metricPickOne&lt;/P&gt;&lt;P&gt;RESIDENT MetricsOptions;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, if I wanted to sum up sales in a expression but don´t want to hardcode sum(sales) but instead wanted to use the Metrics Options, how do I do that? I tried sum(_metricPickOne) but that didn´t work.&lt;/P&gt;&lt;P&gt;I know I can use condition and say _metricPickOne = 'sales'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; than sum(sales) but what if I have more than 10 metrics? Is there another way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;alphez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 12:26:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373916#M576010</guid>
      <dc:creator />
      <dc:date>2012-04-30T12:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: summing variables in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373917#M576011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; If you &lt;EM&gt;Select&lt;/EM&gt; one value from either your &lt;EM&gt;_metricsNo &lt;/EM&gt;or &lt;EM&gt;_metrics &lt;/EM&gt;fields then this expression would work: &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum($(=Only(_metrics))) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; or &lt;STRONG&gt; sum($(=_metrics))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 16:50:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373917#M576011</guid>
      <dc:creator />
      <dc:date>2012-04-30T16:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: summing variables in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373918#M576012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; The safest way to code this would be to use minstring() instead of only(). This way, no selection will still work and it will also protect against losing the one and only one selection (which I would recommend) on _metrics.&lt;BR /&gt;&lt;STRONG&gt;sum($(=minstring(_metrics)))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 18:31:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373918#M576012</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-30T18:31:37Z</dc:date>
    </item>
    <item>
      <title>suming variables in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373919#M576013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I create a text box in the example and try your solution, i get the null sign '-'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Apr 2012 18:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373919#M576013</guid>
      <dc:creator />
      <dc:date>2012-04-30T18:34:44Z</dc:date>
    </item>
    <item>
      <title>suming variables in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373920#M576014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;sum($(=minstring(_metrics))) will work but the problem is you well always get the same number no matter whether you choose sales, Qty, Margin or Margin%. Thats because minstring(_metrics) always returns Margin&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 09:58:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373920#M576014</guid>
      <dc:creator />
      <dc:date>2012-05-02T09:58:40Z</dc:date>
    </item>
    <item>
      <title>suming variables in expressions</title>
      <link>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373921#M576015</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;MinString() returns minumum value in the list, &lt;/P&gt;&lt;P&gt;If you select a value then it returns selected value.&amp;nbsp; &lt;/P&gt;&lt;P&gt;If you select multiple values then it minimum value in the selected values.&lt;/P&gt;&lt;P&gt;If you do not select any values then it returns minimum values of the overall list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2012 11:52:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/suming-variables-in-expressions/m-p/373921#M576015</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-05-02T11:52:42Z</dc:date>
    </item>
  </channel>
</rss>

