<?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: Inter-record calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Inter-record-calculation/m-p/1591193#M443577</link>
    <description>&lt;P&gt;I'm starting to think the best I can do now is use to script to fill some new fields.&lt;/P&gt;&lt;P&gt;In the meantime, here is what I came up with (result attached), but for now it's not satisfying (I only want Exp3 in my graph but it depends on the other ones so I can't remove them).&lt;/P&gt;&lt;P&gt;Dimension = [Year/Month]&lt;/P&gt;&lt;P&gt;Exp1 = MonthlyFigure = count({$} DISTINCT [Id])&lt;/P&gt;&lt;P&gt;Exp2 = YTD_Average =&amp;nbsp;([MonthlyFigure]&lt;BR /&gt;+ if([Year] = Above([Year]),Above([MonthlyFigure]),0) //M-1&lt;BR /&gt;+ if([Year]= Above([Year],2),Above([MonthlyFigure],2),0) //M-2&lt;BR /&gt;+ if([Year] = Above([Year],3),Above([MonthlyFigure],3),0) //M-3&lt;BR /&gt;+ if([Year] = Above([Year],4),Above([MonthlyFigure],4),0) //M-4&lt;BR /&gt;+ if([Year] = Above([Year],5),Above([MonthlyFigure],5),0) //M-5&lt;BR /&gt;+ if([Year] = Above([Year],6),Above([MonthlyFigure],6),0) //M-6&lt;BR /&gt;+ if([Year] = Above([Year],7),Above([MonthlyFigure],7),0) //M-7&lt;BR /&gt;+ if([Year] = Above([Year],8),Above([MonthlyFigure],8),0) //M-8&lt;BR /&gt;+ if([Year] = Above([Year],9),Above([MonthlyFigure],9),0) //M-9&lt;BR /&gt;+ if([Year] = Above([Year],10),Above([MonthlyFigure],10),0) //M-10&lt;BR /&gt;+ if([Year] = Above([Year],11),Above([MonthlyFigure,11),0) //M-11&lt;BR /&gt;)/[Month]&lt;/P&gt;&lt;P&gt;Exp3 = YearlyAverageAndCurrentYTD =&amp;nbsp;if([Year] = vCurrentYear OR [Month] = 12, [YTD_Average], 0)&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2019 17:09:03 GMT</pubDate>
    <dc:creator>emmanueld</dc:creator>
    <dc:date>2019-06-12T17:09:03Z</dc:date>
    <item>
      <title>Inter-record calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Inter-record-calculation/m-p/1590872#M443557</link>
      <description>&lt;P&gt;Hello gentlemen, ladies,&lt;/P&gt;&lt;P&gt;I am struggling with some calculations using inter-record functions. I'm not sure exactly how to do, and what functions is best using. Can you help me please?&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll find attached the detail of what I'm trying to do.&amp;nbsp;&lt;/P&gt;&lt;P&gt;First tab : this is the basic calculation I make in order to get one value per month (no problem so far).&lt;/P&gt;&lt;P&gt;Second tab (where I struggle): Now I try to calculate a Year-to-date average for each month, utilising the values of each previous month in the same year.&lt;/P&gt;&lt;P&gt;Third tab (just a filter, so it should be easy): the final result I'm expecting, that is, a graph showing the YTD values of december on previous years, and the YTD values of each month on current year.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;If no better idea, I will try using (current_value + above(1) + above(2) +... + above(11))/12 but that looks dirty to me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:19:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inter-record-calculation/m-p/1590872#M443557</guid>
      <dc:creator>emmanueld</dc:creator>
      <dc:date>2024-11-16T03:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Inter-record calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Inter-record-calculation/m-p/1591193#M443577</link>
      <description>&lt;P&gt;I'm starting to think the best I can do now is use to script to fill some new fields.&lt;/P&gt;&lt;P&gt;In the meantime, here is what I came up with (result attached), but for now it's not satisfying (I only want Exp3 in my graph but it depends on the other ones so I can't remove them).&lt;/P&gt;&lt;P&gt;Dimension = [Year/Month]&lt;/P&gt;&lt;P&gt;Exp1 = MonthlyFigure = count({$} DISTINCT [Id])&lt;/P&gt;&lt;P&gt;Exp2 = YTD_Average =&amp;nbsp;([MonthlyFigure]&lt;BR /&gt;+ if([Year] = Above([Year]),Above([MonthlyFigure]),0) //M-1&lt;BR /&gt;+ if([Year]= Above([Year],2),Above([MonthlyFigure],2),0) //M-2&lt;BR /&gt;+ if([Year] = Above([Year],3),Above([MonthlyFigure],3),0) //M-3&lt;BR /&gt;+ if([Year] = Above([Year],4),Above([MonthlyFigure],4),0) //M-4&lt;BR /&gt;+ if([Year] = Above([Year],5),Above([MonthlyFigure],5),0) //M-5&lt;BR /&gt;+ if([Year] = Above([Year],6),Above([MonthlyFigure],6),0) //M-6&lt;BR /&gt;+ if([Year] = Above([Year],7),Above([MonthlyFigure],7),0) //M-7&lt;BR /&gt;+ if([Year] = Above([Year],8),Above([MonthlyFigure],8),0) //M-8&lt;BR /&gt;+ if([Year] = Above([Year],9),Above([MonthlyFigure],9),0) //M-9&lt;BR /&gt;+ if([Year] = Above([Year],10),Above([MonthlyFigure],10),0) //M-10&lt;BR /&gt;+ if([Year] = Above([Year],11),Above([MonthlyFigure,11),0) //M-11&lt;BR /&gt;)/[Month]&lt;/P&gt;&lt;P&gt;Exp3 = YearlyAverageAndCurrentYTD =&amp;nbsp;if([Year] = vCurrentYear OR [Month] = 12, [YTD_Average], 0)&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 17:09:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Inter-record-calculation/m-p/1591193#M443577</guid>
      <dc:creator>emmanueld</dc:creator>
      <dc:date>2019-06-12T17:09:03Z</dc:date>
    </item>
  </channel>
</rss>

