<?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 with if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-with-if-statement/m-p/365025#M135810</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your suggestion did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 25 Jun 2012 18:36:32 GMT</pubDate>
    <dc:creator>userid128223</dc:creator>
    <dc:date>2012-06-25T18:36:32Z</dc:date>
    <item>
      <title>set analysis with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-with-if-statement/m-p/365023#M135808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Below statement gives me current total sales of all the companies despite any selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is:&lt;/P&gt;&lt;P&gt;Give me total sales of currently selected company, excluding other companies, excluding any time line selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(PurchaseDate &amp;gt; AddMonths(today(),-12)&amp;nbsp;&amp;nbsp; this is true then&amp;nbsp; sum(totalsales) - (total cost)&amp;nbsp;&amp;nbsp; excluding time period selection. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 20:54:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-with-if-statement/m-p/365023#M135808</guid>
      <dc:creator>userid128223</dc:creator>
      <dc:date>2012-06-22T20:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-with-if-statement/m-p/365024#M135809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;should be something like this... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(&amp;nbsp; {$&amp;lt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;PurchaseDate &lt;/SPAN&gt;={'&amp;gt;$(=&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;AddMonths(today(),-12&lt;/SPAN&gt;) '}&amp;gt;} totalsales) - &lt;BR /&gt;sum({$&amp;lt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;PurchaseDate &lt;/SPAN&gt;={'&amp;gt;$(=&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;AddMonths(today(),-12&lt;/SPAN&gt;) '}&amp;gt;} total cost)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are dealing with period, it's better to build a calendar master data, says from past 2 year until next 50 years. &lt;/P&gt;&lt;P&gt;with columns like MMM YYYY, Quarter, row numbering, YYYYMM in digit (simply YYYY*100 + MM)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row numbering will be very very useful and handly when u want to do past 12 month until prev month... etc.... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Jun 2012 05:25:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-with-if-statement/m-p/365024#M135809</guid>
      <dc:creator />
      <dc:date>2012-06-23T05:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-with-if-statement/m-p/365025#M135810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your suggestion did not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2012 18:36:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-with-if-statement/m-p/365025#M135810</guid>
      <dc:creator>userid128223</dc:creator>
      <dc:date>2012-06-25T18:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-with-if-statement/m-p/365026#M135811</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;Suppose the date format for PurchaseDate is DD-MM-YYYY then&lt;/P&gt;&lt;P&gt;Create a variable vDate= date(AddMonths(today(),-12),'DD-MM-YYYY')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;=sum( &lt;/SPAN&gt;{&amp;lt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;PurchaseDate &lt;/SPAN&gt; ={"&amp;gt;=$(vDate)",Year,Month}&amp;gt;}&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt; totalsales) -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt;sum( &lt;/SPAN&gt;{&amp;lt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;PurchaseDate &lt;/SPAN&gt; ={"&amp;gt;=$(vDate)",Year,Month}&amp;gt;}&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt; &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #ffffff;"&gt; total cost)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-size: 12px; background-color: #ffffff; font-family: Arial;"&gt;Note- to exclude time period selections bypass Year and Month as i did in the expression.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Apurva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2012 05:47:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-with-if-statement/m-p/365026#M135811</guid>
      <dc:creator />
      <dc:date>2012-06-26T05:47:30Z</dc:date>
    </item>
  </channel>
</rss>

