<?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: Working with values that have already been cumulated in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Working-with-values-that-have-already-been-cumulated/m-p/2153611#M93447</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt;&amp;nbsp;for your recommendation.&amp;nbsp; &amp;nbsp;I did end up making a flag in my Master Calendar,&lt;/P&gt;
&lt;P&gt;"if(TempDate = monthstart(yearend(TempDate, 0, 10)), 1,0) as LastDateFlag,"&lt;/P&gt;
&lt;P&gt;and then calling that flag in my set analysis "Avg({&amp;lt; LastDateFlag = {'1'} &amp;gt;} Revenue)"&lt;/P&gt;
&lt;P&gt;and is working for my report.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2023 14:52:21 GMT</pubDate>
    <dc:creator>danaleota1</dc:creator>
    <dc:date>2023-12-15T14:52:21Z</dc:date>
    <item>
      <title>Working with values that have already been cumulated</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-values-that-have-already-been-cumulated/m-p/2153221#M93407</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a dataset that gives FYTD values so they have already been accumulated.&amp;nbsp; In order to show metric by fiscal year I want to grab the last month's value for that year.&lt;/P&gt;
&lt;P&gt;I tried the following&amp;nbsp;&lt;/P&gt;
&lt;P&gt;aggr(avg({&amp;lt; Rev_Date = {'$(=Date(max(Rev_Date), ''))'} &amp;gt;} Revenue), FiscalYear)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but it's not returning the revenue of the last month by Fiscal Year&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any suggestions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 19:06:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-values-that-have-already-been-cumulated/m-p/2153221#M93407</guid>
      <dc:creator>danaleota1</dc:creator>
      <dc:date>2023-12-14T19:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Working with values that have already been cumulated</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-values-that-have-already-been-cumulated/m-p/2153234#M93408</link>
      <description>&lt;P&gt;Hi, this might be esier if you flag the dates of the last month of each fiscal year in the script, so you only need something like:&lt;SPAN&gt;avg({&amp;lt;isFYLastMonth={1}&amp;gt;} Revenue)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;About the aggr: set analysis is expanded before calculating the expression, so it will only return the max overall date, not by FiscalYear. You can use If() to compare with somthing like Max(TOTAL &amp;lt;&lt;SPAN&gt;FiscalYear&amp;gt; Rev_Date) but this might have an impact on performance.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Also Aggr retunrs a different value for each dimension values set as parameters, so ususally it needs an aggregation to tell what to do with all those values&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2023 20:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-values-that-have-already-been-cumulated/m-p/2153234#M93408</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2023-12-14T20:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Working with values that have already been cumulated</title>
      <link>https://community.qlik.com/t5/App-Development/Working-with-values-that-have-already-been-cumulated/m-p/2153611#M93447</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt;&amp;nbsp;for your recommendation.&amp;nbsp; &amp;nbsp;I did end up making a flag in my Master Calendar,&lt;/P&gt;
&lt;P&gt;"if(TempDate = monthstart(yearend(TempDate, 0, 10)), 1,0) as LastDateFlag,"&lt;/P&gt;
&lt;P&gt;and then calling that flag in my set analysis "Avg({&amp;lt; LastDateFlag = {'1'} &amp;gt;} Revenue)"&lt;/P&gt;
&lt;P&gt;and is working for my report.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2023 14:52:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Working-with-values-that-have-already-been-cumulated/m-p/2153611#M93447</guid>
      <dc:creator>danaleota1</dc:creator>
      <dc:date>2023-12-15T14:52:21Z</dc:date>
    </item>
  </channel>
</rss>

