<?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: What is the difference between ValueList() and ValueLoop()? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-is-the-difference-between-ValueList-and-ValueLoop/m-p/391135#M145871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example, create a calculated dimension in a straight table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=ValueList('KPI1','KPI2')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, an expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=pick(match( &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ValueList('KPI1','KPI2')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'KPI1','KPI2')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,sum(FIELD)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,count(FIELD)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll get a dimension with two value, KPI1 and KPI2. To check in your expression, which is the current dimension value, you'll need to repeat the Valuelist() function as used in the dimension again in the expression. (Above can also be written as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=if( ValueList('KPI1','KPI2') = 'KPI1', sum(FIELD), &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if( ValueList('KPI1','KPI2') = 'KPI2', count(FIELD) ))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can create a dimension on the fly in a chart which is not based on a field in your data model (I think that's why its called synthetic).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Valuelist() just uses the values you are listing as arguments, valueloop creates the dimension values based on start, end and step values.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Feb 2013 05:50:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-28T05:50:24Z</dc:date>
    <item>
      <title>What is the difference between ValueList() and ValueLoop()?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-difference-between-ValueList-and-ValueLoop/m-p/391134#M145870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Difference ValueList() and ValueLoop()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please explain with examples...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 05:44:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-difference-between-ValueList-and-ValueLoop/m-p/391134#M145870</guid>
      <dc:creator />
      <dc:date>2013-02-28T05:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between ValueList() and ValueLoop()?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-difference-between-ValueList-and-ValueLoop/m-p/391135#M145871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For example, create a calculated dimension in a straight table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=ValueList('KPI1','KPI2')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, an expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=pick(match( &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ValueList('KPI1','KPI2')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'KPI1','KPI2')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,sum(FIELD)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;,count(FIELD)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You'll get a dimension with two value, KPI1 and KPI2. To check in your expression, which is the current dimension value, you'll need to repeat the Valuelist() function as used in the dimension again in the expression. (Above can also be written as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=if( ValueList('KPI1','KPI2') = 'KPI1', sum(FIELD), &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if( ValueList('KPI1','KPI2') = 'KPI2', count(FIELD) ))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you can create a dimension on the fly in a chart which is not based on a field in your data model (I think that's why its called synthetic).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Valuelist() just uses the values you are listing as arguments, valueloop creates the dimension values based on start, end and step values.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2013 05:50:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-difference-between-ValueList-and-ValueLoop/m-p/391135#M145871</guid>
      <dc:creator />
      <dc:date>2013-02-28T05:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between ValueList() and ValueLoop()?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-the-difference-between-ValueList-and-ValueLoop/m-p/391136#M145872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Practicle example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/222888#222888" title="http://community.qlik.com/message/222888#222888"&gt;http://community.qlik.com/message/222888#222888&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 09:51:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-the-difference-between-ValueList-and-ValueLoop/m-p/391136#M145872</guid>
      <dc:creator />
      <dc:date>2013-03-01T09:51:53Z</dc:date>
    </item>
  </channel>
</rss>

