<?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: Expression Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-Calculation/m-p/564759#M210807</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now I understand what you are trying to do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you use Month as dimension, you cannot reach transactions belonging to other months than the current one. At least not with a standard If() function. The Aggregation scope is that specific month only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read more about the aggregation scope here:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/09/09/aggregation-scope"&gt;The Aggregation Scope&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read more about what to do to create rolling numbers here: ( Above() or Aggr() - or both )&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2012/10/12/accumulative-sums"&gt;Accumulative Sums&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Feb 2014 13:46:17 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2014-02-25T13:46:17Z</dc:date>
    <item>
      <title>Expression Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Calculation/m-p/564756#M210804</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;i am currently calculating late deliveries KPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it is made up of two factors&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Delayed Orders (#Late) =1 +&amp;nbsp; 2. Changed Orders (Code Ä3, Ä2,Ä1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Act_deldate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(Rolling 1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Act_deldate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;lt;=&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(maxDate)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;#Late&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 1,&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ChangeCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Ä1' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ChangeCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'Ä2' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ChangeCode&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ='Ä3',&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;%InLevNr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;However my syntax fails me!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Any&amp;nbsp; suggestions?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Best&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Bradley&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 09:50:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Calculation/m-p/564756#M210804</guid>
      <dc:creator />
      <dc:date>2014-02-25T09:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Calculation/m-p/564757#M210805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have a comma too much (after "#Late=1" ). Try this instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count(&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(Act_deldate &amp;gt;$(Rolling 1) or Act_deldate &amp;lt;=$(maxDate),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( #Late = 1 or ChangeCode = 'Ä1' or ChangeCode = 'Ä2' or ChangeCode ='Ä3',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %InLevNr&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 11:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Calculation/m-p/564757#M210805</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-02-25T11:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Calculation/m-p/564758#M210806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Henric Thank you for your suggestion however it is still showing the total amount for all the months even when using the $Variable Rolling 1 or Rolling 12&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variables are defined accordingly - &amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Rolling 1 = AddMonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Act_deldate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),-1) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Rolling 12 = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Act_deldate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),-12) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see below&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Error.png" class="jive-image" height="322" src="https://community.qlik.com/legacyfs/online/53792_Error.png" width="455" /&gt;&lt;/P&gt;&lt;P&gt;should i perhaps use the rolling statements as flags in the script or is my logic incorrect in the statement, right now having a hard time figuring out why this is is not working for the count functions, however for the totals&amp;nbsp; ie R1 R6 R12 Month Total is correct, but Late is not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;Brad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 13:20:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Calculation/m-p/564758#M210806</guid>
      <dc:creator />
      <dc:date>2014-02-25T13:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-Calculation/m-p/564759#M210807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now I understand what you are trying to do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you use Month as dimension, you cannot reach transactions belonging to other months than the current one. At least not with a standard If() function. The Aggregation scope is that specific month only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read more about the aggregation scope here:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/09/09/aggregation-scope"&gt;The Aggregation Scope&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read more about what to do to create rolling numbers here: ( Above() or Aggr() - or both )&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/blogs/qlikviewdesignblog/2012/10/12/accumulative-sums"&gt;Accumulative Sums&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-4252"&gt;Calculating rolling n-period totals, averages or other aggregations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Feb 2014 13:46:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-Calculation/m-p/564759#M210807</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-02-25T13:46:17Z</dc:date>
    </item>
  </channel>
</rss>

