<?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 Excluding the remaning weeksof the year from an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Excluding-the-remaning-weeksof-the-year-from-an-expression/m-p/929114#M321330</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'm having trouble with calculating the weekly cumulative revenue. Im currently using below expression:&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: #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;KA_SUJaar&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;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;table_code&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;$(#vOEI_of_AEI)&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;revenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)=0,0,&amp;nbsp; // To exclude the remaining week of the year&lt;BR /&gt; &lt;BR /&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;KA_SUJaar&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;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;table_code&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;$(#vOEI_of_AEI)&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;revenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&amp;nbsp;&amp;nbsp; &lt;BR /&gt; -&lt;BR /&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;KA_SUJaar&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())-1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;table_code&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;$(#vOEI_of_AEI)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;}revenue&lt;/SPAN&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: #0000ff; font-size: 8pt;"&gt;rowno&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()=1,0,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;above&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Cum. verschil t.o.v. VJ]&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: 10pt;"&gt;The if statement is to make sure the expression results in a zero when the selected week is in the future. See image. (red bars)&lt;IMG alt="Example.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/102550_Example.PNG" style="width: 620px; height: 158px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;However, if a weekly revenue &lt;STRONG&gt;in between &lt;/STRONG&gt;is zero, the expression doesnt work anymore! Does anyone know a way to change the expression and make it work correctly?&lt;/SPAN&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="font-size: 10pt;"&gt;Any help is appriciated!&lt;/SPAN&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Oct 2015 13:09:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-10-20T13:09:26Z</dc:date>
    <item>
      <title>Excluding the remaning weeksof the year from an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Excluding-the-remaning-weeksof-the-year-from-an-expression/m-p/929114#M321330</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'm having trouble with calculating the weekly cumulative revenue. Im currently using below expression:&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: #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;KA_SUJaar&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;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;table_code&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;$(#vOEI_of_AEI)&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;revenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)=0,0,&amp;nbsp; // To exclude the remaining week of the year&lt;BR /&gt; &lt;BR /&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;KA_SUJaar&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;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;table_code&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;$(#vOEI_of_AEI)&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;revenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&amp;nbsp;&amp;nbsp; &lt;BR /&gt; -&lt;BR /&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;KA_SUJaar&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())-1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;table_code&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;$(#vOEI_of_AEI)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;}revenue&lt;/SPAN&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: #0000ff; font-size: 8pt;"&gt;rowno&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()=1,0,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;above&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Cum. verschil t.o.v. VJ]&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: 10pt;"&gt;The if statement is to make sure the expression results in a zero when the selected week is in the future. See image. (red bars)&lt;IMG alt="Example.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/102550_Example.PNG" style="width: 620px; height: 158px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;However, if a weekly revenue &lt;STRONG&gt;in between &lt;/STRONG&gt;is zero, the expression doesnt work anymore! Does anyone know a way to change the expression and make it work correctly?&lt;/SPAN&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="font-size: 10pt;"&gt;Any help is appriciated!&lt;/SPAN&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Oct 2015 13:09:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excluding-the-remaning-weeksof-the-year-from-an-expression/m-p/929114#M321330</guid>
      <dc:creator />
      <dc:date>2015-10-20T13:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding the remaning weeksof the year from an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Excluding-the-remaning-weeksof-the-year-from-an-expression/m-p/929115#M321331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a small example qlikview document that demonstrates the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 12:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excluding-the-remaning-weeksof-the-year-from-an-expression/m-p/929115#M321331</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-10-23T12:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding the remaning weeksof the year from an expression</title>
      <link>https://community.qlik.com/t5/QlikView/Excluding-the-remaning-weeksof-the-year-from-an-expression/m-p/929116#M321332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aart, if weeks are related to a date field maybe this works:&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;Max(dateField)&amp;gt;ReloadDate()&lt;SPAN style="font-size: 8pt;"&gt;,0, // Or Min(DateField), depens if you want to count current period&lt;BR /&gt;&lt;/SPAN&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;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;KA_SUJaar&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;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;table_code&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;$(#vOEI_of_AEI)&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;revenue&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))&amp;nbsp;&amp;nbsp; &lt;BR /&gt; -&lt;BR /&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;KA_SUJaar&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())-1)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;table_code&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;$(#vOEI_of_AEI)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;} &amp;gt;}revenue&lt;/SPAN&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: #0000ff; font-size: 8pt;"&gt;rowno&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;()=1,0,&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;above&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Cum. verschil t.o.v. VJ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Also you can check directly the week, but i saw is a cycling group a usind date can work with weeks, months, years...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2015 12:25:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excluding-the-remaning-weeksof-the-year-from-an-expression/m-p/929116#M321332</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-10-23T12:25:28Z</dc:date>
    </item>
  </channel>
</rss>

