<?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 Calculation (Set Analysis or If) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280329#M496764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need a little help.&amp;nbsp; I am trying to calculate our dollar value based on an exchange rate.&amp;nbsp; Having a few problems.&amp;nbsp; It does not like my statement.&amp;nbsp; Basically if my MTD flag is 1 and company 3000 use exchange rate in calculation otherwise value times -1.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;MTDFlag&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {1},&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Company Code_RBUKRS]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {3000}&amp;gt;} (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[In company code currency_HSL]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Exchange Rate]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; * -1),(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[In company code currency_HSL]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; * -1)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Dec 2011 18:34:56 GMT</pubDate>
    <dc:creator>tmumaw</dc:creator>
    <dc:date>2011-12-05T18:34:56Z</dc:date>
    <item>
      <title>Calculation (Set Analysis or If)</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280329#M496764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Need a little help.&amp;nbsp; I am trying to calculate our dollar value based on an exchange rate.&amp;nbsp; Having a few problems.&amp;nbsp; It does not like my statement.&amp;nbsp; Basically if my MTD flag is 1 and company 3000 use exchange rate in calculation otherwise value times -1.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; font-size: 9pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;MTDFlag&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {1},&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Company Code_RBUKRS]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; = {3000}&amp;gt;} (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[In company code currency_HSL]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[Exchange Rate]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; * -1),(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: maroon; font-size: 9pt;"&gt;[In company code currency_HSL]&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; * -1)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 18:34:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280329#M496764</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2011-12-05T18:34:56Z</dc:date>
    </item>
    <item>
      <title>Calculation (Set Analysis or If)</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280330#M496765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think what you need is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(if(MTDFlag =1 and [Company Code_RBUKRS] = 3000, &lt;/P&gt;&lt;P&gt;([In company code currency_HSL] * [Exchange Rate] * -1), &lt;/P&gt;&lt;P&gt;([In company code currency_HSL] * -1)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 18:44:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280330#M496765</guid>
      <dc:creator />
      <dc:date>2011-12-05T18:44:07Z</dc:date>
    </item>
    <item>
      <title>Calculation (Set Analysis or If)</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280331#M496766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Having problems now with YTD.....tried using same calculation and numbers match mtd,&amp;nbsp; Using same formula only changed MTD to YTD....any ideas?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Dec 2011 20:44:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280331#M496766</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2011-12-05T20:44:07Z</dc:date>
    </item>
    <item>
      <title>Calculation (Set Analysis or If)</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280332#M496770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So do you want an expression that ONLY returns YTD, or an expression that returns one result for YTD and another result for everything else?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 12:00:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280332#M496770</guid>
      <dc:creator />
      <dc:date>2011-12-06T12:00:45Z</dc:date>
    </item>
    <item>
      <title>Calculation (Set Analysis or If)</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280333#M496772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Only YTD, MTD is working fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 13:13:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280333#M496772</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2011-12-06T13:13:00Z</dc:date>
    </item>
    <item>
      <title>Calculation (Set Analysis or If)</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280334#M496773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's not what I meant, I mean did you want an expression similar to your original question? Where if the results fall in YTD then do one calculation, otherwise do another? If this is the case you would use and IF THEN ELSE statement. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to return ONLY data that falls in YTD then you can use set analysis. How is YTD Determined? If you are basing it off of a date field you should be able to use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Year={$(=Year(Today()))}&amp;gt;}&lt;/P&gt;&lt;P&gt;(if( [Company Code_RBUKRS] = 3000, &lt;/P&gt;&lt;P&gt;([In company code currency_HSL] * [Exchange Rate] * -1), &lt;/P&gt;&lt;P&gt;([In company code currency_HSL] * -1)))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where Year is equal to Year(DATEFIELD)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 13:25:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280334#M496773</guid>
      <dc:creator />
      <dc:date>2011-12-06T13:25:07Z</dc:date>
    </item>
    <item>
      <title>Calculation (Set Analysis or If)</title>
      <link>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280335#M496774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks.&amp;nbsp; Everything works perfect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2011 13:47:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculation-Set-Analysis-or-If/m-p/280335#M496774</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2011-12-06T13:47:32Z</dc:date>
    </item>
  </channel>
</rss>

