<?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: if condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/941632#M956298</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum() is aggregate function, cant use like you did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF((AMT/Target)&amp;lt;='0.5','0',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF((AMT/Target)&amp;gt;'0.5' and (AMT/Target)&amp;lt;= '1','1',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF((AMT/Target) &amp;gt;'1','3','0'))) as POINTS_FS&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Resident SALES;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;DROP Table SALES;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Nov 2015 07:30:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-11-05T07:30:09Z</dc:date>
    <item>
      <title>if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/941629#M956295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following tables.&lt;/P&gt;&lt;P&gt;SALES:&lt;/P&gt;&lt;P&gt;LOAD Date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Branch, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(AMT) AS AMT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[\QVD\NewSales.qvd]&lt;/P&gt;&lt;P&gt;(qvd)&lt;/P&gt;&lt;P&gt;Group BY Branch, Date;&lt;/P&gt;&lt;P&gt;LEFT JOIN&lt;/P&gt;&lt;P&gt;TARGET:&lt;/P&gt;&lt;P&gt;LOAD Branch, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EndDate as Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[\TARGETS.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is TARGETS)&lt;/P&gt;&lt;P&gt;Group BY Branch, EndDate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from the above table, i need to calculate points for branch which is based on sum(AMT)/sum(Target)&lt;/P&gt;&lt;P&gt;i.e.,&lt;STRONG&gt; if &lt;SPAN style="font-size: 13.3333px;"&gt;sum(AMT)/sum(Target) is less than 50%, points=0&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if &lt;SPAN style="font-size: 13.3333px;"&gt;sum(AMT)/sum(Target) is between 50% and 100%, points=1&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if &lt;SPAN style="font-size: 13.3333px;"&gt;sum(AMT)/sum(Target) is above 100%, points = 3&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i m trying the below script, but i m getting error as invalid expression while loading script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SALE_POINTS:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(sum(AMT)/sum(Target)&amp;lt;='0.5','0',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(sum(AMT)/sum(Target)&amp;gt;'0.5' and sum(AMT)/sum(Target)&amp;lt;= '1','1',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(sum(AMT)/sum(Target) &amp;gt;'1','3','0'))) as POINTS_FS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident SALES;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DROP Table SALES;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to correct the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 07:23:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/941629#M956295</guid>
      <dc:creator />
      <dc:date>2015-11-05T07:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/941630#M956296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;Try with alias names&lt;/P&gt;&lt;P&gt;IF(AMT/TARGET&amp;lt;.......,,&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>Thu, 05 Nov 2015 07:26:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/941630#M956296</guid>
      <dc:creator>sasikanth</dc:creator>
      <dc:date>2015-11-05T07:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/941631#M956297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Missing&amp;nbsp; Group By.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 07:29:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/941631#M956297</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-11-05T07:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/941632#M956298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sum() is aggregate function, cant use like you did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF((AMT/Target)&amp;lt;='0.5','0',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF((AMT/Target)&amp;gt;'0.5' and (AMT/Target)&amp;lt;= '1','1',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF((AMT/Target) &amp;gt;'1','3','0'))) as POINTS_FS&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Resident SALES;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;DROP Table SALES;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 07:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/941632#M956298</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-11-05T07:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/941633#M956299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to do group by Remaining Fields as you are using aggregation fucntion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;SALE_POINTS:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF(sum(AMT)/sum(Target)&amp;lt;='0.5','0',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF(sum(AMT)/sum(Target)&amp;gt;'0.5' and sum(AMT)/sum(Target)&amp;lt;= '1','1',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF(sum(AMT)/sum(Target) &amp;gt;'1','3','0'))) as POINTS_FS&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Resident SALES&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;group by &lt;/STRONG&gt;&lt;SPAN style="line-height: 1.5em;"&gt;&lt;STRONG&gt;Date,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: inherit; line-height: 1.5em; font-style: inherit; font-size: 10pt;"&gt;Branch&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;STRONG style="font-family: inherit; line-height: 1.5em; font-style: inherit;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;DROP Table SALES;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 07:31:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/941633#M956299</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-11-05T07:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/941634#M956300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you Sum() in the script then you have use Group other wise you will get error, try scirpt below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;SALE_POINTS:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LOAD &lt;SPAN style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit; font-weight: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Date,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Branch,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF(sum(AMT)/sum(Target)&amp;lt;='0.5','0',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF(sum(AMT)/sum(Target)&amp;gt;'0.5' and sum(AMT)/sum(Target)&amp;lt;= '1','1',&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;IF(sum(AMT)/sum(Target) &amp;gt;'1','3','0'))) as POINTS_FS&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Resident SALES&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;group by &lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Date,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Branch&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;DROP Table SALES;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Hope this helps you.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Jagan.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 07:36:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/941634#M956300</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2015-11-05T07:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/941635#M956301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SALES:&lt;/P&gt;&lt;P&gt;Load Branch, Date, SUM(AMT) as AMT&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;From TableName&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Group By Branch, Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LEFT JOIN (SALES)&lt;/P&gt;&lt;P&gt;Load Branch, EndDate as Date, SUM(Target) as Target&lt;/P&gt;&lt;P&gt;From TableName&lt;/P&gt;&lt;P&gt;Group By Branch, EndDate &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Final:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp; Branch,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp; SUM(AMT)/SUM(Target) as Achieved,&lt;/P&gt;&lt;P&gt;&amp;nbsp; If((SUM(AMT)/SUM(Target)) &amp;gt;= 1, 3, If((SUM(AMT)/SUM(Target)) &amp;gt;= 0.5, 1, 0)) as Flag_Branch_Date&lt;/P&gt;&lt;P&gt;Resident SALES&lt;/P&gt;&lt;P&gt;Group By Branch, Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Left Join (Final)&lt;/P&gt;&lt;P&gt;Load Branch, If((SUM(AMT)/SUM(Target)) &amp;gt;= 1, 3, If((SUM(AMT)/SUM(Target)) &amp;gt;= 0.5, 1, 0)) as Flag_Branch&lt;/P&gt;&lt;P&gt;Resident SALES&lt;/P&gt;&lt;P&gt;Group By Branch;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table SALES;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 07:39:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/941635#M956301</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2015-11-05T07:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/941636#M956302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Something like this&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SALE_POINTS:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF((sum(AMT)/sum(Target))&amp;lt;=0.5,0,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF((sum(AMT)/sum(Target))&amp;gt;0.5 and (sum(AMT)/sum(Target))&amp;lt;= 1,1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF(sum(AMT)/sum(Target) &amp;gt;1,3,0))) as POINTS_FS&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident SALES&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Group By Date, Branch;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DROP Table SALES;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 07:41:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/941636#M956302</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2015-11-05T07:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: if condition</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition/m-p/941637#M956303</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 would agree with Balraj, As it looks like you already have Sum Values you are using on your original loads.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless you are just wanting one values pre branch and not monthly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you would want to add group by Branch, to what you currently have.for POINTS_FS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2015 09:03:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition/m-p/941637#M956303</guid>
      <dc:creator>Mark_Little</dc:creator>
      <dc:date>2015-11-05T09:03:31Z</dc:date>
    </item>
  </channel>
</rss>

