<?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: Time Dimension, Value N/N-1 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Time-Dimension-Value-N-N-1/m-p/421364#M484951</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A clue? Sure, set analysis expressions calculates a set per chart, not per row. When you use period as a dimension in your chart you won't get a set for each period. That's why &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;SUM({$&amp;lt;Year={$(=Only(Year)-1)}&amp;gt;}&lt;/SPAN&gt; doesn't work. You need to select 1 year or only(Year) doesn't return a value. And if you select 1 year then the &lt;EM&gt;turnover (last year)&lt;/EM&gt; values are displayed in the year before, not the selected year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is join the table in the script with a new table so every period is associated with the period of the previous year. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T1:&lt;/P&gt;&lt;P&gt;load Year, Month, Month&amp;amp;Year as Period, turnover&lt;/P&gt;&lt;P&gt;from &lt;EM&gt;...somewhere...&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join load &lt;/P&gt;&lt;P&gt;(Year+1) as Year,&lt;/P&gt;&lt;P&gt;Month, Month&amp;amp;(Year+1) as Period, turnover as turnover_last_year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 May 2013 16:47:19 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2013-05-02T16:47:19Z</dc:date>
    <item>
      <title>Time Dimension, Value N/N-1</title>
      <link>https://community.qlik.com/t5/QlikView/Time-Dimension-Value-N-N-1/m-p/421363#M484950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stucked with a problem I can't solve. Let me explain you.&lt;/P&gt;&lt;P&gt;I have quite a simple fact :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Year&lt;/LI&gt;&lt;LI&gt;Month&lt;/LI&gt;&lt;LI&gt;Period (Month + Year)&lt;/LI&gt;&lt;LI&gt;€ turnover&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I want is a table showing :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="width: 100%; border: 1px solid #000000;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;my dimension -&amp;gt; (period)&lt;BR /&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Jan 2012&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Feb 2012&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;&lt;SPAN style="color: #ffffff;"&gt;&lt;STRONG&gt;Mar 2012&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TH&gt;&lt;TH align="center" style="background-color: #6690bc;" valign="middle"&gt;...&lt;BR /&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;turnover&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;250&lt;/TD&gt;&lt;TD&gt;..&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;turnover (last year)&lt;/TD&gt;&lt;TD&gt;90&lt;/TD&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;150&lt;/TD&gt;&lt;TD&gt;..&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried these two expressions :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SUM(€ turnover)&lt;/LI&gt;&lt;LI&gt;SUM({$&amp;lt;Year={$(=Only(Year)-1)}&amp;gt;}&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But unfortunately, all I manage to get is a table with these dimensions : Jan 2011, Feb 2011, Mar 2011 (with 0 in the turnover expression, and the correct value in the turnover (last year) expression), Jan 2012, Feb 2012, Mar 2013 (with the correct value in the turnover expression and 0 in the turnover (last year) expression).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do anyone have a clue about this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&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;Damien&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 16:01:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-Dimension-Value-N-N-1/m-p/421363#M484950</guid>
      <dc:creator />
      <dc:date>2013-05-02T16:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Time Dimension, Value N/N-1</title>
      <link>https://community.qlik.com/t5/QlikView/Time-Dimension-Value-N-N-1/m-p/421364#M484951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A clue? Sure, set analysis expressions calculates a set per chart, not per row. When you use period as a dimension in your chart you won't get a set for each period. That's why &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;SUM({$&amp;lt;Year={$(=Only(Year)-1)}&amp;gt;}&lt;/SPAN&gt; doesn't work. You need to select 1 year or only(Year) doesn't return a value. And if you select 1 year then the &lt;EM&gt;turnover (last year)&lt;/EM&gt; values are displayed in the year before, not the selected year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you can do is join the table in the script with a new table so every period is associated with the period of the previous year. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T1:&lt;/P&gt;&lt;P&gt;load Year, Month, Month&amp;amp;Year as Period, turnover&lt;/P&gt;&lt;P&gt;from &lt;EM&gt;...somewhere...&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join load &lt;/P&gt;&lt;P&gt;(Year+1) as Year,&lt;/P&gt;&lt;P&gt;Month, Month&amp;amp;(Year+1) as Period, turnover as turnover_last_year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 May 2013 16:47:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Time-Dimension-Value-N-N-1/m-p/421364#M484951</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-02T16:47:19Z</dc:date>
    </item>
  </channel>
</rss>

