<?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: Set Analysis and IF Statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502019#M187521</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Maybe this :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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;invoice_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=YearStart(Today(), -1))&amp;lt;=$(=Date(AddMonths(Today(),-12) ))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;invoice_line_extension&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, 21 Aug 2013 15:50:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-21T15:50:54Z</dc:date>
    <item>
      <title>Set Analysis and IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502015#M187517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could anyone help me convert this to a Set Analysis expression? This works fine until a year is selected and then it breaks. I always want to sum the invoice_line_extension for the prior year no matter what year is selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works Fine - Sum (if (InYearToDate (invoice_date, Today(), -1), invoice_line_extension))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does not work - Sum (if ({&amp;lt;=InYearToDate&amp;gt;=} (invoice_date, Today(), -1), invoice_line_extension))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 18:57:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502015#M187517</guid>
      <dc:creator>dthornburg</dc:creator>
      <dc:date>2013-08-16T18:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502016#M187518</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;First of all calculate the previous year from your date field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vLastYear=Year(Max(&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;invoice_date&lt;/SPAN&gt;))-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also get the year in your data model say you have Year as a field..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then your expression would be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={''$(vLastYear)''}&amp;gt;} &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;invoice_line_extension&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Sushil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 20:14:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502016#M187518</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2013-08-16T20:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502017#M187519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with this&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;invoice_date&lt;/SPAN&gt;={"&amp;gt;=$(=YearStart(Today()))&amp;lt;=$(=Date(Today() -1))"}&amp;gt;} &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;invoice_line_extension&lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 21:10:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502017#M187519</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2013-08-16T21:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502018#M187520</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; Neither one of these worked. When I try an use the first suggestion I get a null value. The 2nd gives me the total for the previous year. The If statement that works without suggestions provides last years total to date not for the entire year. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 15:12:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502018#M187520</guid>
      <dc:creator>dthornburg</dc:creator>
      <dc:date>2013-08-21T15:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502019#M187521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Maybe this :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&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;invoice_date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=YearStart(Today(), -1))&amp;lt;=$(=Date(AddMonths(Today(),-12) ))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;invoice_line_extension&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, 21 Aug 2013 15:50:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502019#M187521</guid>
      <dc:creator />
      <dc:date>2013-08-21T15:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis and IF Statement</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502020#M187522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try: sum({&amp;lt;invoice_date={"=year(invoice_date)=year(today())"}&amp;gt;} invoice_line_extension)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 16:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-and-IF-Statement/m-p/502020#M187522</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-08-21T16:04:19Z</dc:date>
    </item>
  </channel>
</rss>

