<?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 valuelist in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/valuelist/m-p/289075#M586231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey again, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been searching around some more and I have found a post where they described the if-statement for the use of valuelists. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now changed my expression to the following (my dimension is still the same): &lt;/P&gt;&lt;P&gt;if(valuelist($(=Only(Jahr)),$(=Only(Jahr)-1))=$(Only(Jahr)),count({$&amp;lt;Jahr={$(=Only(Jahr))},Monat={Jan}&amp;gt;}UmsatzBestZeile),&lt;/P&gt;&lt;P&gt;if(valuelist($(=Only(Jahr)),$(=Only(Jahr)-1))=$(Only(Jahr)-1),count({$&amp;lt;Jahr={$(=Only(Jahr)-1)},Monat={Jan}&amp;gt;}UmsatzBestZeile),''))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunatelly this doesn't work either. Now I get no values at all in my fields. &lt;/P&gt;&lt;P&gt;If I try to use fixed values in the valuelist (e.g. valuelist(2009,2008)) then it does work alright. Is it not possible to keep the valuelist flexible with variables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas with this? Thanks a lot!&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jul 2011 08:57:35 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-07-19T08:57:35Z</dc:date>
    <item>
      <title>valuelist</title>
      <link>https://community.qlik.com/t5/QlikView/valuelist/m-p/289074#M586230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with a table using calculated dimensions with valuelist. &lt;/P&gt;&lt;P&gt;What I want to display is a certain value (income) over each month for a selected year and the corresponding prior year. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My table has 1 dimension: &lt;/P&gt;&lt;P&gt;=valuelist($(=Only(Year)),$(=Only(Year)-1))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then for each month I have a column in which I want to calculate the income for the present and for the past year (the 2 lines of the dimension). I tried the following: &lt;/P&gt;&lt;P&gt;aggr(count({&amp;lt;Month={Jan}&amp;gt;}Income),valuelist($(=Only(Year)),$(=Only(Year)-1)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunatelly this does not work. With the above shown formula I always get the income value for January of the present year in both lines (present and past year). &lt;/P&gt;&lt;P&gt;Could anyone help me out with this and tell me what am I doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 08:26:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valuelist/m-p/289074#M586230</guid>
      <dc:creator />
      <dc:date>2011-07-19T08:26:59Z</dc:date>
    </item>
    <item>
      <title>valuelist</title>
      <link>https://community.qlik.com/t5/QlikView/valuelist/m-p/289075#M586231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey again, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been searching around some more and I have found a post where they described the if-statement for the use of valuelists. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now changed my expression to the following (my dimension is still the same): &lt;/P&gt;&lt;P&gt;if(valuelist($(=Only(Jahr)),$(=Only(Jahr)-1))=$(Only(Jahr)),count({$&amp;lt;Jahr={$(=Only(Jahr))},Monat={Jan}&amp;gt;}UmsatzBestZeile),&lt;/P&gt;&lt;P&gt;if(valuelist($(=Only(Jahr)),$(=Only(Jahr)-1))=$(Only(Jahr)-1),count({$&amp;lt;Jahr={$(=Only(Jahr)-1)},Monat={Jan}&amp;gt;}UmsatzBestZeile),''))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunatelly this doesn't work either. Now I get no values at all in my fields. &lt;/P&gt;&lt;P&gt;If I try to use fixed values in the valuelist (e.g. valuelist(2009,2008)) then it does work alright. Is it not possible to keep the valuelist flexible with variables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas with this? Thanks a lot!&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 08:57:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valuelist/m-p/289075#M586231</guid>
      <dc:creator />
      <dc:date>2011-07-19T08:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: valuelist</title>
      <link>https://community.qlik.com/t5/QlikView/valuelist/m-p/289076#M586232</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;It could be that you're missing some '=' symbols before the odd 'only'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I copied your syntax on a test qvw and it worked fine &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(valuelist($(=Only(Year)),$(=Only(Year)-1))=$(=Only(Year)),sum({$&amp;lt;Year={$(=Only(Year))},Month={Jan}&amp;gt;}LineSalesAmount),&lt;/P&gt;&lt;P&gt;if(valuelist($(=Only(Year)),$(=Only(Year)-1))=$(=Only(Year)-1),sum({$&amp;lt;Year={$(=Only(Year)-1)},Month={Jan}&amp;gt;}LineSalesAmount),''))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so maybe the bits I've added an underlined = symbol below are missing an '=' just before the 'Only(Jahr)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(valuelist($(=Only(Jahr)),$(=Only(Jahr)-1))=$(&lt;SPAN style="text-decoration: underline;"&gt; = &lt;/SPAN&gt; Only(Jahr)),count({$&amp;lt;Jahr={$(=Only(Jahr))},Monat={Jan}&amp;gt;}UmsatzBestZeile),&lt;/P&gt;&lt;P&gt;if(valuelist($(=Only(Jahr)),$(=Only(Jahr)-1))=$(&lt;SPAN style="text-decoration: underline;"&gt; = &lt;/SPAN&gt;&amp;nbsp; Only(Jahr)-1),count({$&amp;lt;Jahr={$(=Only(Jahr)-1)},Monat={Jan}&amp;gt;}UmsatzBestZeile),''))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might be easier to create variables like vY and vLastY so you just have to do the dollar replacement in both dimension and expression e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(valuelist($(vY),$(vLastY))=$(vY),sum({$&amp;lt;Year={$(vY)},Month={Jan}&amp;gt;}LineSalesAmount),&lt;/P&gt;&lt;P&gt;if(valuelist($(vY),$(vLastY))=$(vLastY),sum({$&amp;lt;Year={$(vLastY)},Month={Jan}&amp;gt;}LineSalesAmount),''))&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;HD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 15:19:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/valuelist/m-p/289076#M586232</guid>
      <dc:creator>hdonald</dc:creator>
      <dc:date>2011-07-19T15:19:43Z</dc:date>
    </item>
  </channel>
</rss>

