<?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: Display Previous year data with year as dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705512#M54087</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28859"&gt;@martinpohl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still have issue with month, where i want to compare current month with previous month.&lt;/P&gt;&lt;P&gt;it works great with above() for all months except for January where i would like to compare to December of previous year .&amp;nbsp;&lt;BR /&gt;i understand that it won't work with above since December of last year is not within the selection.&lt;/P&gt;&lt;P&gt;It also doesn't work with set expression since Dimension value is January and the data is for December.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can this be achieved?&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
    <pubDate>Wed, 27 May 2020 10:03:43 GMT</pubDate>
    <dc:creator>Lital</dc:creator>
    <dc:date>2020-05-27T10:03:43Z</dc:date>
    <item>
      <title>Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705055#M54049</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to create a Bar Chart with&amp;nbsp; dimension Year&amp;nbsp; and a measure showing the previous year&amp;nbsp; sum of&amp;nbsp; [Value]&amp;nbsp; meaning&amp;nbsp; sum({ previous year} [Value])&lt;/P&gt;&lt;P&gt;for example I expect to see for 2019 bar the sum for 2018, for 2018 bar the sum for&amp;nbsp; 2017 and so on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried many options, but it doesn't work well.&lt;BR /&gt;the same worked for me before with other dimensions.&lt;/P&gt;&lt;P&gt;how can this be done?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*I actually need to display the change percentage between the year and the year before,&amp;nbsp; &amp;nbsp;i was trying to simplify the issue.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:20:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705055#M54049</guid>
      <dc:creator>Lital</dc:creator>
      <dc:date>2024-11-16T02:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705071#M54051</link>
      <description>&lt;P&gt;You should try using &lt;STRONG&gt;above()&lt;/STRONG&gt; instead.&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 07:47:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705071#M54051</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2020-05-26T07:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705080#M54053</link>
      <description>&lt;P&gt;Thank you for your replay&lt;/P&gt;&lt;P&gt;The sum for each year is made of multiple records, my data looks something like this:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;EmpID&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;ComponentID&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Date&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;Value&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;31/12/2018&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;31/12/2018&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;3&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;31/12/2018&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;31/12/2019&lt;/TD&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="25px"&gt;1&lt;/TD&gt;&lt;TD height="25px"&gt;3&lt;/TD&gt;&lt;TD height="25px"&gt;31/12/2019&lt;/TD&gt;&lt;TD height="25px"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to use above() i would need to have one record for year ? or how can i use it like this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 08:10:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705080#M54053</guid>
      <dc:creator>Lital</dc:creator>
      <dc:date>2020-05-26T08:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705085#M54054</link>
      <description>&lt;P&gt;don't use it in script, use it in bar chart&lt;/P&gt;&lt;P&gt;it works:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sum_above.JPG" style="width: 541px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34324i039E16A2C0B54BCF/image-size/large?v=v2&amp;amp;px=999" role="button" title="sum_above.JPG" alt="sum_above.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;first expression sum(Value)&lt;/P&gt;&lt;P&gt;second expression above(sum(Value)&lt;/P&gt;&lt;P&gt;third expression sum(Value)/above(sum(Value))&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 08:20:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705085#M54054</guid>
      <dc:creator>martinpohl</dc:creator>
      <dc:date>2020-05-26T08:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705094#M54055</link>
      <description>&lt;P&gt;works great for years thanks both !&lt;/P&gt;&lt;P&gt;I would like to drill down to Quarter/Month level but still have comparison to same period last year&lt;BR /&gt;with above() i get last quarter/month.&lt;/P&gt;&lt;P&gt;I also tried using the offset - resulted in no data.&lt;/P&gt;&lt;P&gt;how can i do this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 08:40:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705094#M54055</guid>
      <dc:creator>Lital</dc:creator>
      <dc:date>2020-05-26T08:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705103#M54056</link>
      <description>&lt;P&gt;this could not work.&lt;/P&gt;&lt;P&gt;in your bar chart you have all years so you can calculate with all years.&lt;/P&gt;&lt;P&gt;If you are selecting year 2018-2020, you only will see calculations for year 2019 and 2020, for year 2017 there are no values for (excluded by selection)&lt;/P&gt;&lt;P&gt;So if you are selection year 2019 there are only values for year 2019, no values from 2018 to compare.&lt;/P&gt;&lt;P&gt;But you can use:&lt;/P&gt;&lt;P&gt;if (getselectedcount(Year)=1,&lt;/P&gt;&lt;P&gt;sum(Value)/sum({&amp;lt;Year={$(=max(Year)-1))}&amp;gt;} Value),&lt;/P&gt;&lt;P&gt;sum(Value)/above(sum(Value))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;In that case, is year is selected, the value in month or quarter is compared with month or quarter from selected Year -1&lt;/P&gt;&lt;P&gt;If no Year is selected, the existing expression is used.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 08:51:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705103#M54056</guid>
      <dc:creator>martinpohl</dc:creator>
      <dc:date>2020-05-26T08:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705107#M54057</link>
      <description>&lt;P&gt;thank you, looks to be working great like this!&lt;/P&gt;&lt;P&gt;and especially thank you for explaining &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;I understand better how it works now&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 09:13:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705107#M54057</guid>
      <dc:creator>Lital</dc:creator>
      <dc:date>2020-05-26T09:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705512#M54087</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28859"&gt;@martinpohl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still have issue with month, where i want to compare current month with previous month.&lt;/P&gt;&lt;P&gt;it works great with above() for all months except for January where i would like to compare to December of previous year .&amp;nbsp;&lt;BR /&gt;i understand that it won't work with above since December of last year is not within the selection.&lt;/P&gt;&lt;P&gt;It also doesn't work with set expression since Dimension value is January and the data is for December.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can this be achieved?&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 10:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705512#M54087</guid>
      <dc:creator>Lital</dc:creator>
      <dc:date>2020-05-27T10:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705547#M54090</link>
      <description>&lt;P&gt;Yes you could.&lt;/P&gt;&lt;P&gt;It look something like&lt;/P&gt;&lt;P&gt;above(sum({&amp;lt;Date={"&amp;gt;=$(=monthstart(addmonths(makedate(max(Year)),-1)))"}, Year= &amp;gt;} Value))&lt;/P&gt;&lt;P&gt;In words:&lt;/P&gt;&lt;P&gt;take the max selected year, eg 2020&lt;/P&gt;&lt;P&gt;make it to a date = 1/1/2020&lt;/P&gt;&lt;P&gt;add a minus month = 12/1/2019&lt;/P&gt;&lt;P&gt;took the monthstart = 12/1/19&lt;/P&gt;&lt;P&gt;To achieve that you take values with date Dec 2019 although year 2020 is selected you have to excluse selection in year&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 10:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705547#M54090</guid>
      <dc:creator>martinpohl</dc:creator>
      <dc:date>2020-05-27T10:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705594#M54095</link>
      <description>&lt;P&gt;thanks for your response, but that's not working so well.&amp;nbsp;&lt;BR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28859"&gt;@martinpohl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;the expression does display the previous month for every month except January and it added a column for Dec (in 2020 selection) with&amp;nbsp; the data of the previous column (April 2020 -&amp;nbsp; the last data in the model)&lt;/P&gt;&lt;P&gt;to my understanding above() is used&amp;nbsp;&lt;SPAN&gt;To get values from other rows within the same chart.&lt;/SPAN&gt;&lt;BR /&gt;but December 2019 is not within the scope of the chart when selecting year 2020.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 31 May 2020 09:15:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1705594#M54095</guid>
      <dc:creator>Lital</dc:creator>
      <dc:date>2020-05-31T09:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Display Previous year data with year as dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1707344#M54252</link>
      <description>&lt;P&gt;That's right, the expression only shows previous value.&lt;/P&gt;&lt;P&gt;But you can add actual value.&lt;/P&gt;&lt;P&gt;See example&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="martinpohl_0-1591080791796.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/34791i22A7568228BD9B48/image-size/medium?v=v2&amp;amp;px=400" role="button" title="martinpohl_0-1591080791796.png" alt="martinpohl_0-1591080791796.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and the value in column 2 in above-expression is december value&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 06:54:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Display-Previous-year-data-with-year-as-dimension/m-p/1707344#M54252</guid>
      <dc:creator>martinpohl</dc:creator>
      <dc:date>2020-06-02T06:54:01Z</dc:date>
    </item>
  </channel>
</rss>

