<?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: 3 years cumulative return in Line chart QlikView in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784468#M1209870</link>
    <description>&lt;P&gt;im sure there is a way to do this without a bridge and use a smart expression in the front end.&amp;nbsp; but the advantage of this approach is that you move the burden of processing the aggregation to the script and not the front end.&amp;nbsp; this will prove beneficial once you get past 10s of millions of records.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 21 Feb 2021 13:43:20 GMT</pubDate>
    <dc:creator>edwin</dc:creator>
    <dc:date>2021-02-21T13:43:20Z</dc:date>
    <item>
      <title>3 years cumulative return in Line chart QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784432#M1209863</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I try to calculate cumulative return and display the information in a Line chart.&lt;/P&gt;&lt;P&gt;Axis X is months and Axis Y is yields.&lt;/P&gt;&lt;P&gt;For each month on X-axis I have to present a return of 3 years.&lt;/P&gt;&lt;P&gt;That is, in month 01/2021 on the graph, I have to present a cumulative return from month 01/2018 to month 01/2021, in month 02/2021 on the graph, I have to present a cumulative return from month 02/2018 to month 02/2021 and so on.&lt;/P&gt;&lt;P&gt;Anyone have an idea what the expression is?&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 04:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784432#M1209863</guid>
      <dc:creator>EliAttiaQlik</dc:creator>
      <dc:date>2021-02-21T04:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: 3 years cumulative return in Line chart QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784465#M1209868</link>
      <description>&lt;P&gt;i would solve this by creating abridge between your calendar and the fact table.&amp;nbsp; make an association between the month in your calendar to the month in your fact where the fact month &amp;gt;=your month-3 years up to the month&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;where factMonth&amp;gt;=addmonths(month,-3*12) and factMonth&amp;lt;=month;&lt;/LI-CODE&gt;&lt;P&gt;this way when you select 1/2021 you effectively select 1/2018 to 1/2021 and so on per requirement.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Fact:
load date as factDate, monthstart(date) as factMonth, amount;
load date(today() - floor(rand()*4*365)) as date, floor(rand()*100) as amount
while iterno()&amp;lt;=4*365;
load 1 AutoGenerate(1);

NoConcatenate
tmpBridge: load distinct factMonth Resident Fact;

inner join (tmpBridge) load factMonth as month Resident tmpBridge;


NoConcatenate Bridge: load factMonth, month 
resident tmpBridge
where factMonth&amp;gt;=addmonths(month,-3*12) and factMonth&amp;lt;=month;

drop table tmpBridge;&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 21 Feb 2021 13:39:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784465#M1209868</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-21T13:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: 3 years cumulative return in Line chart QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784467#M1209869</link>
      <description>&lt;P&gt;in your chart, you use month (from your calendar) as dimension and sum(amount) as expression and each expression will be total of prior 3 years + current month&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edwin_0-1613914857201.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49506i32C4EA3ECA84A254/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edwin_0-1613914857201.png" alt="edwin_0-1613914857201.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 13:41:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784467#M1209869</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-21T13:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: 3 years cumulative return in Line chart QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784468#M1209870</link>
      <description>&lt;P&gt;im sure there is a way to do this without a bridge and use a smart expression in the front end.&amp;nbsp; but the advantage of this approach is that you move the burden of processing the aggregation to the script and not the front end.&amp;nbsp; this will prove beneficial once you get past 10s of millions of records.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 13:43:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784468#M1209870</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-21T13:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: 3 years cumulative return in Line chart QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784469#M1209871</link>
      <description>&lt;P&gt;there will be some nuances of course if not all months are represented in your fact table.&amp;nbsp; but the idea of the solution will be the same you just need to tweak this part:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NoConcatenate
tmpBridge: load distinct factMonth Resident Fact;&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 21 Feb 2021 13:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784469#M1209871</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-21T13:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: 3 years cumulative return in Line chart QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784472#M1209873</link>
      <description>&lt;P&gt;hi, thanks for your reply&lt;/P&gt;&lt;P&gt;The 3 years is just an example. the user can select 3 years or any other range of months. That is why the solution should be an&amp;nbsp;expression in the front end.&amp;nbsp;&lt;BR /&gt;The amount of records is not an issue here, we are talking about thousands of securities and 10 years of history.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;the data stored in only one table that contains security number and a numeric field represents the yield, so in my opinion, it must be a straight forward solution.&lt;/P&gt;&lt;P&gt;Can someone help with out-of-the-box solution?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 13:57:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784472#M1209873</guid>
      <dc:creator>EliAttiaQlik</dc:creator>
      <dc:date>2021-02-21T13:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: 3 years cumulative return in Line chart QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784473#M1209874</link>
      <description>&lt;P&gt;10x Edwin, I will use this approach for intermediate&amp;nbsp;while i will keep searching a wide front end solution&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 14:04:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784473#M1209874</guid>
      <dc:creator>EliAttiaQlik</dc:creator>
      <dc:date>2021-02-21T14:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: 3 years cumulative return in Line chart QlikView</title>
      <link>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784484#M1209878</link>
      <description>&lt;P&gt;just in case you need it, you can create multiple date types in the bridge, then just add the date type in your set analysis.&amp;nbsp; of course there should be a finite set of date range selections the user can choose so each of those selections will have a corresponding date type&lt;/P&gt;&lt;P&gt;&amp;nbsp;good luck&lt;/P&gt;</description>
      <pubDate>Sun, 21 Feb 2021 16:21:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/3-years-cumulative-return-in-Line-chart-QlikView/m-p/1784484#M1209878</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-02-21T16:21:30Z</dc:date>
    </item>
  </channel>
</rss>

