<?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 set analysis with criteria before max date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-with-criteria-before-max-date/m-p/1197818#M625828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a balance sheet dashboard with all accounting statements and a initial balance of each G/L account.&lt;/P&gt;&lt;P&gt;When I filter dates, I want the set analysis to sum initial balance + all statements BEFORE maximum selected date.&lt;/P&gt;&lt;P&gt;[Data] is the date field and to get maximum date I use &lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14764445616295825" jivemacro_uid="_14764445616295825" modifiedtitle="true"&gt;
&lt;P&gt;=Max(Data)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;This is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But to sum values &lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14764445508448681 jive_text_macro" jivemacro_uid="_14764445508448681"&gt;
&lt;P&gt;&amp;lt;= &lt;SPAN style="font-size: 13.3333px;"&gt;Max(Data) &lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;in set analysis is not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;It should be something like below formula as I saw in many &lt;SPAN style="font-size: 13.3333px;"&gt;related &lt;/SPAN&gt;discussions, but it is not working.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14764445435818180 jive_text_macro" jivemacro_uid="_14764445435818180" modifiedtitle="true"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=initial_balance+sum({&amp;lt;Data={"&amp;lt;=$(=max(Data))"}&amp;gt;} AMOUNT)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on how to correctly write this set analysis sentence?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Oct 2016 11:33:32 GMT</pubDate>
    <dc:creator>h_demarco</dc:creator>
    <dc:date>2016-10-14T11:33:32Z</dc:date>
    <item>
      <title>set analysis with criteria before max date</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-with-criteria-before-max-date/m-p/1197818#M625828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a balance sheet dashboard with all accounting statements and a initial balance of each G/L account.&lt;/P&gt;&lt;P&gt;When I filter dates, I want the set analysis to sum initial balance + all statements BEFORE maximum selected date.&lt;/P&gt;&lt;P&gt;[Data] is the date field and to get maximum date I use &lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14764445616295825" jivemacro_uid="_14764445616295825" modifiedtitle="true"&gt;
&lt;P&gt;=Max(Data)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;This is working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But to sum values &lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14764445508448681 jive_text_macro" jivemacro_uid="_14764445508448681"&gt;
&lt;P&gt;&amp;lt;= &lt;SPAN style="font-size: 13.3333px;"&gt;Max(Data) &lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;in set analysis is not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;It should be something like below formula as I saw in many &lt;SPAN style="font-size: 13.3333px;"&gt;related &lt;/SPAN&gt;discussions, but it is not working.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14764445435818180 jive_text_macro" jivemacro_uid="_14764445435818180" modifiedtitle="true"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=initial_balance+sum({&amp;lt;Data={"&amp;lt;=$(=max(Data))"}&amp;gt;} AMOUNT)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on how to correctly write this set analysis sentence?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 11:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-with-criteria-before-max-date/m-p/1197818#M625828</guid>
      <dc:creator>h_demarco</dc:creator>
      <dc:date>2016-10-14T11:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis with criteria before max date</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-with-criteria-before-max-date/m-p/1197819#M625829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you need to use only less than &amp;lt; instead of less than equal to &amp;lt;=&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=RangeSum(initial_balance, Sum({&amp;lt;Data={"&amp;lt;$(=max(Data))"}&amp;gt;} AMOUNT))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also do you make any selection in date related field which might contradict your set analysis? like selection in Month field? If you do, then you need to ignore that in your set analysis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 16:58:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-with-criteria-before-max-date/m-p/1197819#M625829</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-14T16:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis with criteria before max date</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-with-criteria-before-max-date/m-p/1197820#M625830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked. In fact, error was in contradicted selection. Once we ignored it, correct sum showed up.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 15:02:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-with-criteria-before-max-date/m-p/1197820#M625830</guid>
      <dc:creator>h_demarco</dc:creator>
      <dc:date>2016-10-31T15:02:04Z</dc:date>
    </item>
  </channel>
</rss>

