<?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: If and set analysis in same expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633441#M677814</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post sample app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 May 2014 06:00:47 GMT</pubDate>
    <dc:creator>anbu1984</dc:creator>
    <dc:date>2014-05-30T06:00:47Z</dc:date>
    <item>
      <title>If and set analysis in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633440#M677813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have problem with if / set analysis expression. Expression definition:&lt;/P&gt;&lt;P&gt;=if(CashPeriod=1 and CashCalcMark=1, sum({&amp;lt;Year={$(=varCurrentYear)},Month={$(=vMinMonth)}&amp;gt;}CashFlowAmount),&lt;/P&gt;&lt;P&gt;if(CashPeriod=1 and CashCalcMark=2, sum({&amp;lt;Year={$(=varCurrentYear)},Month={$(=vMinMonth)}&amp;gt;}CashFlowAmount*-1),&lt;/P&gt;&lt;P&gt;if(CashPeriod=2 and CashCalcMark=1, sum({&amp;lt;Year={$(=varCurrentYear)}&amp;gt;}CashFlowAmount),&lt;/P&gt;&lt;P&gt;if(CashPeriod=2 and CashCalcMark=2,sum({&amp;lt;Year={$(=varCurrentYear)}&amp;gt;}CashFlowAmount*-1)))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And it returns only -.&lt;/P&gt;&lt;P&gt;Can someone please help me with this, I don´t know what´s wrong there.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 05:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633440#M677813</guid>
      <dc:creator />
      <dc:date>2014-05-30T05:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: If and set analysis in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633441#M677814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post sample app&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 06:00:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633441#M677814</guid>
      <dc:creator>anbu1984</dc:creator>
      <dc:date>2014-05-30T06:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Re: If and set analysis in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633442#M677815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Actually I did nothing and now I my expression works. BUT not for totals, only row sums are correct (I mean 4th column). So my question is how I can get total sums calculated? Sorry those lines are in Finnish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 06:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633442#M677815</guid>
      <dc:creator />
      <dc:date>2014-05-30T06:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Re: If and set analysis in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633443#M677816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this expression&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={$(=varCurrentYear)},Month={$(=vMinMonth)},CashPeriod={1},CashCalcMark={1} &amp;gt;}CashFlowAmount)+&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={$(=varCurrentYear)},Month={$(=vMinMonth)},CashPeriod={1},CashCalcMark={2}&amp;gt;}CashFlowAmount*-1)+&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={$(=varCurrentYear)},Month={$(=vMinMonth)},CashPeriod={2},CashCalcMark={1}&amp;gt;}CashFlowAmount)+&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={$(=varCurrentYear)},CashPeriod={2},CashCalcMark={2}&amp;gt;}CashFlowAmount*-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 07:08:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633443#M677816</guid>
      <dc:creator>SergeyMak</dc:creator>
      <dc:date>2014-05-30T07:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: If and set analysis in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633444#M677817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to use aggr like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Aggr(&lt;/P&gt;&lt;P&gt;if(CashPeriod=1 and CashCalcMark=1, &lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({&amp;lt;Year={$(=varCurrentYear)}, Month={$(=vMinMonth)}&amp;gt;} CashFlowAmount),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(CashPeriod=1 and CashCalcMark=2, &lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({&amp;lt;Year={$(=varCurrentYear)}, Month={$(=vMinMonth)}&amp;gt;} CashFlowAmount*-1),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(CashPeriod=2 and CashCalcMark=1, &lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({&amp;lt;Year={$(=varCurrentYear)}&amp;gt;} CashFlowAmount),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(CashPeriod=2 and CashCalcMark=2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sum({&amp;lt;Year={$(=varCurrentYear)}&amp;gt;} CashFlowAmount*-1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)))&lt;/P&gt;&lt;P&gt; ,taso2nimi_Kassa&lt;/P&gt;&lt;P&gt; ,taso3nimi_Kassa&lt;/P&gt;&lt;P&gt; ,CashType&lt;/P&gt;&lt;P&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This returns -183255,46 in your uploaded example. Replace the expression you posted with this one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 07:18:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633444#M677817</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-05-30T07:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: If and set analysis in same expression</title>
      <link>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633445#M677818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yey, It works, thank you Sergey!&lt;/P&gt;&lt;P&gt;(There is in 3rd clause also vMinMonth but when I removed it, expression works such fine!)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 May 2014 07:19:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-and-set-analysis-in-same-expression/m-p/633445#M677818</guid>
      <dc:creator />
      <dc:date>2014-05-30T07:19:21Z</dc:date>
    </item>
  </channel>
</rss>

