<?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 is not working properly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-is-not-working-properly/m-p/1102691#M891292</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck in one set analysis, Scenario is:&lt;/P&gt;&lt;P&gt;I have 3 columns - 1) ReportingDate 2) AccountCode 3) Balance. &lt;/P&gt;&lt;P&gt;ReportingDate is having different dates and I am writing an expression in Pivot table&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Balance&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt; so I am getting the sum based on ReportingDate selection or AccountCode selection.&lt;/P&gt;&lt;P&gt;Now my problem is:&lt;/P&gt;&lt;P&gt;I am passing all the ReportingDate values into a variable vComparisonDate and that variable I am using in Calendar object.&lt;/P&gt;&lt;P&gt;Suppose I have 3 ReportingDates like 2016-03-31, 2016-04-25, 2016-05-31 then vComparisonDate variable will have minimum value 2016-03-31 and maximum value 2016-05-31.&lt;/P&gt;&lt;P&gt;Based on the above I want to write one more expression which will show me the sum of balances for the date selected by ComparisonDate Calendar(Which is nothing but having the dates from ReportingDate). (Scenario is that user will select a different date for vComparisonDate than ReportingDate)&lt;/P&gt;&lt;P&gt;I have tried multiple expressions but could not achieve the result(Sometimes I am getting the same sum for ComparisonDate also which I am getting for ReportingDate):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;sum({$&amp;lt;vComparisonDate=E(ReportingDate)&amp;gt;} [Balance])&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;sum({$&amp;lt;vComparisonDate=E(GetFieldSelections(ReportingDate))&amp;gt;}&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;sum( {$&amp;lt;ReportingDate = E({$&amp;lt;$(vComparisonDate)={ReportingDate}&amp;gt;})&amp;gt;} &lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;BR /&gt; sum({$&amp;lt;ReportingDate=&amp;gt;} If(ReportingDate=Date(vComparisonDate), 0, [&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;]))&lt;BR /&gt; sum({$&amp;lt;ReportingDate=&amp;gt;} If(ReportingDate=Date(vComparisonDate), 0, [&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;]))&lt;BR /&gt; sum( {$&amp;lt;ReportingDate ={$&amp;lt;ReportingDate={$(vComparisonDate)}&amp;gt;})&amp;gt;} [&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;] )&lt;BR /&gt; Sum({&amp;lt;$(vComparisonDate)='2016-03-31'&amp;gt;[&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;])&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;If(ReportingDate=Date(vComparisonDate), 0,sum({&amp;lt;ReportingDate&amp;gt;}[&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;])) &lt;BR /&gt;&amp;nbsp; &lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//If(ReportingDate=Date(vComparisonDate), 0, Sum({&amp;lt;ReportingDate={$(vComparisonDate)}&amp;gt;}[&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;]))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me ASAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pushkar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Set Analysis is not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-is-not-working-properly/m-p/1102691#M891292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck in one set analysis, Scenario is:&lt;/P&gt;&lt;P&gt;I have 3 columns - 1) ReportingDate 2) AccountCode 3) Balance. &lt;/P&gt;&lt;P&gt;ReportingDate is having different dates and I am writing an expression in Pivot table&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Balance&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt; so I am getting the sum based on ReportingDate selection or AccountCode selection.&lt;/P&gt;&lt;P&gt;Now my problem is:&lt;/P&gt;&lt;P&gt;I am passing all the ReportingDate values into a variable vComparisonDate and that variable I am using in Calendar object.&lt;/P&gt;&lt;P&gt;Suppose I have 3 ReportingDates like 2016-03-31, 2016-04-25, 2016-05-31 then vComparisonDate variable will have minimum value 2016-03-31 and maximum value 2016-05-31.&lt;/P&gt;&lt;P&gt;Based on the above I want to write one more expression which will show me the sum of balances for the date selected by ComparisonDate Calendar(Which is nothing but having the dates from ReportingDate). (Scenario is that user will select a different date for vComparisonDate than ReportingDate)&lt;/P&gt;&lt;P&gt;I have tried multiple expressions but could not achieve the result(Sometimes I am getting the same sum for ComparisonDate also which I am getting for ReportingDate):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;sum({$&amp;lt;vComparisonDate=E(ReportingDate)&amp;gt;} [Balance])&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;sum({$&amp;lt;vComparisonDate=E(GetFieldSelections(ReportingDate))&amp;gt;}&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;sum( {$&amp;lt;ReportingDate = E({$&amp;lt;$(vComparisonDate)={ReportingDate}&amp;gt;})&amp;gt;} &lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;&lt;BR /&gt; sum({$&amp;lt;ReportingDate=&amp;gt;} If(ReportingDate=Date(vComparisonDate), 0, [&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;]))&lt;BR /&gt; sum({$&amp;lt;ReportingDate=&amp;gt;} If(ReportingDate=Date(vComparisonDate), 0, [&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;]))&lt;BR /&gt; sum( {$&amp;lt;ReportingDate ={$&amp;lt;ReportingDate={$(vComparisonDate)}&amp;gt;})&amp;gt;} [&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;] )&lt;BR /&gt; Sum({&amp;lt;$(vComparisonDate)='2016-03-31'&amp;gt;[&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;])&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;If(ReportingDate=Date(vComparisonDate), 0,sum({&amp;lt;ReportingDate&amp;gt;}[&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;])) &lt;BR /&gt;&amp;nbsp; &lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//If(ReportingDate=Date(vComparisonDate), 0, Sum({&amp;lt;ReportingDate={$(vComparisonDate)}&amp;gt;}[&lt;SPAN style="color: #008000;"&gt;Balance&lt;/SPAN&gt;]))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me ASAP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Pushkar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-is-not-working-properly/m-p/1102691#M891292</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis is not working properly</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-is-not-working-properly/m-p/1102692#M891293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Goodafternoon Pushkar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-I am not sure what you want to achieve. If I look at the expressions you mention, it seems that you want the Sum(Balance) if your ReportingDate is not your ComparisonDate?&lt;/P&gt;&lt;P&gt;-And what is the Value of your Variable Name?:&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/135879_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;-Could you make a simple QV file and upload it? Or show some printscreens?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Aug 2016 14:42:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-is-not-working-properly/m-p/1102692#M891293</guid>
      <dc:creator>jharke</dc:creator>
      <dc:date>2016-08-29T14:42:37Z</dc:date>
    </item>
  </channel>
</rss>

