<?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: average comparison if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717100#M1063149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i suppose to make max(date) in a script as a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMaxWeek = max(week) &lt;/P&gt;&lt;P&gt;LET vLowerWeek = max(week)-14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use the variables in set analysis, beacuse its more efficent than if statement &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Sep 2014 10:09:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-09-17T10:09:15Z</dc:date>
    <item>
      <title>average comparison if statement</title>
      <link>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717098#M1063147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am wondering what is the best way to show a comparison to the previous 13 weeks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to show the most recent 13 week average but cannot get my if statement correct - can someone please help?&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;count&lt;/SPAN&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;week&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;lt;&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;week&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;week&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;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;week&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)-14 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;answered&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='Yes',&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;answered&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 09:53:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717098#M1063147</guid>
      <dc:creator />
      <dc:date>2014-09-17T09:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: average comparison if statement</title>
      <link>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717099#M1063148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;WeekNum = {'&amp;lt;=$(Week(Today()))&amp;gt;=$(=Week(Today())-13)'}&amp;gt;}Amount)/13&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change your field names accordingly...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:06:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717099#M1063148</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-09-17T10:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: average comparison if statement</title>
      <link>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717100#M1063149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i suppose to make max(date) in a script as a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vMaxWeek = max(week) &lt;/P&gt;&lt;P&gt;LET vLowerWeek = max(week)-14&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then use the variables in set analysis, beacuse its more efficent than if statement &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:09:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717100#M1063149</guid>
      <dc:creator />
      <dc:date>2014-09-17T10:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: average comparison if statement</title>
      <link>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717101#M1063150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;try to define variable for the max week, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;vMaxWeek = Max(week)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;and use set analysis expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;=$(='count({&amp;lt;week={"&amp;lt;'&amp;amp; vMaxWeek &amp;amp; ' &amp;gt;=' &amp;amp; &lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10.9090909957886px;"&gt;vMaxWeek-14 &amp;amp; '&lt;/SPAN&gt;"}, answered={'Yes'}&amp;gt;}answered)')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:16:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717101#M1063150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-17T10:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: average comparison if statement</title>
      <link>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717102#M1063151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys think about what you're saying..&lt;/P&gt;&lt;P&gt;In Week 8 F.E.&lt;/P&gt;&lt;P&gt;max(Week)-14 would be -6...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll provide you with a more efficient solution ASAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Patrick&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:23:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717102#M1063151</guid>
      <dc:creator />
      <dc:date>2014-09-17T10:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: average comparison if statement</title>
      <link>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717103#M1063152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this might be along the right steps but unfortunately I don't know enough about variables or set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The graph I am trying to plot the average on is has weeks as a dimension. I want a sold line across the graph that shows what the average weekly number of calls answered have been over the past 13 weeks - regardless of what weeks the user selects&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:25:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717103#M1063152</guid>
      <dc:creator />
      <dc:date>2014-09-17T10:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: average comparison if statement</title>
      <link>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717104#M1063153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="Picture1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/66982_Picture1.png" style="width: 620px; height: 172px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Sep 2014 10:29:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/average-comparison-if-statement/m-p/717104#M1063153</guid>
      <dc:creator />
      <dc:date>2014-09-17T10:29:57Z</dc:date>
    </item>
  </channel>
</rss>

