<?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: Current Year and Prior Year Gross Amount Calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770678#M663633</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand you correctly, this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num(&lt;BR /&gt;Sum({&amp;lt;SalesType = {'SalesRegister', 'FreeText', 'Service'}&amp;gt;}LineAmount)&lt;BR /&gt;-&lt;BR /&gt;(&lt;BR /&gt;Sum({&amp;lt;GLAccount={101100,115100,115110,115120,225430,420020},SalesType={'FreeText'}&amp;gt;}LineAmount)&lt;BR /&gt;+ &lt;BR /&gt;if(Year=2015,Sum({&amp;lt;ItemId={'GW_CLX','GW_XTS','CR_L','CR_U'}, SalesType={'SalesRegister'}&amp;gt;}LineAmount),0)&lt;BR /&gt;) &lt;BR /&gt;,'##,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the part with ItemId conditional depending on Year.&amp;nbsp; Also removed unnecessary num() functions for easier read.&lt;/P&gt;&lt;P&gt;Please count my open/close parenthesis, it is easy to mis-type...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Feb 2015 16:05:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-02-09T16:05:50Z</dc:date>
    <item>
      <title>Current Year and Prior Year Gross Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770677#M663632</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 Gross amount calculation different for pror to 2015 and in 2015. The filtering should be based on invoice year.&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;/P&gt;&lt;P&gt;The Calculation i have in 2015 is:&lt;BR /&gt;=num(num(Sum({&amp;lt;SalesType = {'SalesRegister', 'FreeText', 'Service'}&amp;gt;}LineAmount),'##,##0')-(&lt;/P&gt;&lt;P&gt;num(Sum({&amp;lt;GLAccount={101100,115100,115110,115120,225430,420020},SalesType={'FreeText'}&amp;gt;}LineAmount),'##,##0') + num(Sum({&amp;lt;ItemId={'GW_CLX','GW_XTS','CR_L','CR_U'}, SalesType={'SalesRegister'}&amp;gt;}LineAmount),'##,##0')) ,'##,##0')&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;/P&gt;&lt;P&gt;And Prior to 2015 is:&lt;BR /&gt;=num(num(Sum({&amp;lt;SalesType = {'SalesRegister', 'FreeText', 'Service'}&amp;gt;}LineAmount),'##,##0')-&lt;/P&gt;&lt;P&gt;num(Sum({&amp;lt;GLAccount={101100,115100,115110,115120,225430,420020},SalesType={'FreeText'}&amp;gt;}LineAmount),'##,##0'),'##,##0')&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;How to i put the Invoice year in these two piece of expression that will show me the gross amount Prior to 2015 and In 2015 only?&lt;/P&gt;&lt;P&gt;I appreciate your help.&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 15:32:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770677#M663632</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-02-09T15:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Prior Year Gross Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770678#M663633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I understand you correctly, this should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=num(&lt;BR /&gt;Sum({&amp;lt;SalesType = {'SalesRegister', 'FreeText', 'Service'}&amp;gt;}LineAmount)&lt;BR /&gt;-&lt;BR /&gt;(&lt;BR /&gt;Sum({&amp;lt;GLAccount={101100,115100,115110,115120,225430,420020},SalesType={'FreeText'}&amp;gt;}LineAmount)&lt;BR /&gt;+ &lt;BR /&gt;if(Year=2015,Sum({&amp;lt;ItemId={'GW_CLX','GW_XTS','CR_L','CR_U'}, SalesType={'SalesRegister'}&amp;gt;}LineAmount),0)&lt;BR /&gt;) &lt;BR /&gt;,'##,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made the part with ItemId conditional depending on Year.&amp;nbsp; Also removed unnecessary num() functions for easier read.&lt;/P&gt;&lt;P&gt;Please count my open/close parenthesis, it is easy to mis-type...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 16:05:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770678#M663633</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-09T16:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Prior Year Gross Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770679#M663634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. The Current year apply for everything in this calculation. So, In that case i apply the 'If' logic for the whole expression right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;P&gt;How can i calculate the gross amount the prior to 2015 year?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 16:13:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770679#M663634</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-02-09T16:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Prior Year Gross Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770680#M663635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is this expression i am trying is incorrect?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SalesType&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'SalesRegister', 'FreeText', 'Service'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=Year(Today()))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LineAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),'##,##0')-(&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;GLAccount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={101100,115100,115110,115120,225430,420020},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SalesType&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'FreeText'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LineAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),'##,##0') + &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ItemId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'GW_CLX','GW_XTS','CR_L','CR_U'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SalesType&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'SalesRegister'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=Year(Today()))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LineAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),'##,##0')) ,'##,##0')&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Shan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 16:18:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770680#M663635</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-02-09T16:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Prior Year Gross Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770681#M663636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Technically it looks correct.&amp;nbsp; Logically - I can't tell, it depends on what you need.&amp;nbsp; Can only tell what it is doing:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of the three parts, the 1st and the 3rd are calculated only for the current invoice year, and the 2nd for all years.&amp;nbsp; If it is what you need, it is correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 16:27:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770681#M663636</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-09T16:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Prior Year Gross Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770682#M663637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying with your expression and i am getting zero values for this expression. I think i am doing wrong here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&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;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;=2015,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SalesType&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'SalesRegister', 'FreeText', 'Service'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LineAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),0)&lt;BR /&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;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;=2015,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;GLAccount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={101100,115100,115110,115120,225430,420020},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SalesType&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'FreeText'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LineAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),0)&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;[Invoice Year]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;=2015,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ItemId&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'GW_CLX','GW_XTS','CR_L','CR_U'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;SalesType&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'SalesRegister'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;LineAmount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),0)&lt;BR /&gt; ) &lt;BR /&gt; ,'##,##0') &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Shan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 18:30:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770682#M663637</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-02-09T18:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Prior Year Gross Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770683#M663638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, it doesn't look like my expression.&amp;nbsp; It is logically your first expression for 2015 but with condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if("Invoice Year"&amp;lt;=2015, &amp;lt;your expression&amp;gt;, 0)&lt;/P&gt;&lt;P&gt;Given that today all years are &amp;lt;=2015, it should work as your expression.&lt;/P&gt;&lt;P&gt;Can you upload a small example of your application, so I (or anyone else) can take a look?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 18:45:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770683#M663638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-09T18:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Prior Year Gross Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770684#M663639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry if i misinterpret it incorrectly. I didnt mean its your expression. I was trying to say that i was trying to use yours and came up with the mentioned expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Feb 2015 18:54:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770684#M663639</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-02-09T18:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Prior Year Gross Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770685#M663640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just uploaded a piece of my allication. Could you please have a look at it and suggest/Advise how i can achieve what i want in the application?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;The Gross amount Calculation is different in year 2015 than prior to year 2015.&lt;/P&gt;&lt;P&gt;So when i want to calculate gross amount in 2015 i just want only the year 2015 gross amount. But when i mean prior to 2015 then all the year prior to 2015 gross amount should populate. And I would be able to filter based on year and by customer as well.&lt;/P&gt;&lt;P&gt;The way i am trying to calculate is not working the way i want it to be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Highly appreciate your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Shan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 15:35:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770685#M663640</guid>
      <dc:creator>AH</dc:creator>
      <dc:date>2015-02-10T15:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year and Prior Year Gross Amount Calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770686#M663641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got time to take a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 2015 expression is incorrect because of the wrong field names - it should be&lt;STRONG&gt; [Sales Type]&lt;/STRONG&gt; instead of SalesType, and &lt;STRONG&gt;ItemID&lt;/STRONG&gt; instead of ItemId.&amp;nbsp; The "prior to 2015" looks fine, and works as you described.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do have a question about the logic though.&amp;nbsp; It maybe correct or not...&amp;nbsp; How the record should be counted if it fits in more than one part of the expression?&amp;nbsp; In the other way, the expression:&lt;/P&gt;&lt;P&gt;sum(&amp;lt;set1&amp;gt; Amount) + sum(&amp;lt;set2&amp;gt; Amount)&lt;/P&gt;&lt;P&gt;may returns different result then&lt;/P&gt;&lt;P&gt;sum((&amp;lt;set1&amp;gt;+&amp;lt;set2&amp;gt;) Amount)&lt;/P&gt;&lt;P&gt;In the first case, if a record is included in both set1 and set2, it will be counted twice.&amp;nbsp; In the second case, it will be counted only once.&amp;nbsp; If no any record can be in both sets, than it doesn't matter what approach to use.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2015 17:23:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-and-Prior-Year-Gross-Amount-Calculation/m-p/770686#M663641</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-11T17:23:51Z</dc:date>
    </item>
  </channel>
</rss>

