<?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: What is wrong with this formula? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323366#M119155</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;See the attached sample i think it is ok for you I think you have to use some thing like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD SlsYear, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SlsMonth, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;..\Data.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet22);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;If(SlsYear=2011 and SlsMonth&amp;lt;9,Sales,If(SlsYear=2010 and SlsMonth&amp;gt;=9,Sales)) as Roll_12_Sales&lt;/P&gt;&lt;P&gt;Resident Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Let me know &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Sep 2011 08:27:30 GMT</pubDate>
    <dc:creator>its_anandrjs</dc:creator>
    <dc:date>2011-09-05T08:27:30Z</dc:date>
    <item>
      <title>What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323360#M119149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;The below formula is working all fine when I am using it in the expression of a chart. But when I am trying to calculate it in the script, its throwing an error saying "invalid exoression". Can you please explain what is the error ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(SlsYear=2011 and SlsMonth&amp;lt;9,Sum(Sales),If(SlsYear=2010 and SlsMonth&amp;gt;=9,Sum(Sales))) as Roll_12_Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sharma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 07:40:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323360#M119149</guid>
      <dc:creator>montubhardwaj</dc:creator>
      <dc:date>2011-09-05T07:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323361#M119150</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;In which type of table you use it it is resident or what if it is main table so i suggest you to try to load a resident table of the main table and o that try like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;From Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;If(SlsYear=2011 and SlsMonth&amp;lt;9,Sum(Sales),If(SlsYear=2010 and SlsMonth&amp;gt;=9,Sum(Sales))) as Roll_12_Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Resident Temp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand&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;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 07:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323361#M119150</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2011-09-05T07:51:22Z</dc:date>
    </item>
    <item>
      <title>What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323362#M119151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I am pulling this table from a Qvd and directly writing this formula in the table. I have all the variables defined and all the fields are present in the table. And I am writing this formula as a last field in the table. So I dont think I am wrong there. Please explain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 08:03:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323362#M119151</guid>
      <dc:creator>montubhardwaj</dc:creator>
      <dc:date>2011-09-05T08:03:48Z</dc:date>
    </item>
    <item>
      <title>What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323363#M119152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am going to take a stab and guess that SlsYear and SlsMonth are fields that only came into existence during the current load, which means you can't use them in that expression (you'd have to use the long form). However, without the actual code, it's impossible to say for sure..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 08:13:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323363#M119152</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2011-09-05T08:13:26Z</dc:date>
    </item>
    <item>
      <title>What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323364#M119153</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 are using Sum(Sales) then you have to use Groupby in the table or qvd.becaz sum(Sales) is aggra function in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Policy,&lt;/P&gt;&lt;P&gt;Sum(sales) as Sales&lt;/P&gt;&lt;P&gt;From Table1 Group by Policy;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;If(SlsYear=2011 and SlsMonth&amp;lt;9,Sales,If(SlsYear=2010 and SlsMonth&amp;gt;=9,Sales)) as Roll_12_Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;Resident A;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 12px;"&gt;Drop table A;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Kaushal mehta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 08:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323364#M119153</guid>
      <dc:creator>kaushalview</dc:creator>
      <dc:date>2011-09-05T08:17:04Z</dc:date>
    </item>
    <item>
      <title>What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323365#M119154</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;Do you have any sample file for that i thing you want rolling 12 months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 08:17:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323365#M119154</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2011-09-05T08:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323366#M119155</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;See the attached sample i think it is ok for you I think you have to use some thing like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD SlsYear, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SlsMonth, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;..\Data.xlsx&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet22);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;If(SlsYear=2011 and SlsMonth&amp;lt;9,Sales,If(SlsYear=2010 and SlsMonth&amp;gt;=9,Sales)) as Roll_12_Sales&lt;/P&gt;&lt;P&gt;Resident Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And Let me know &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 08:27:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323366#M119155</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2011-09-05T08:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323367#M119156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello sharma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I belive u require rolling 12 mnths calculation,if yes then &lt;/P&gt;&lt;P&gt;see the attached file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps u&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 08:50:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323367#M119156</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-09-05T08:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323368#M119157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;If(SlsYear=2011 and SlsMonth&amp;lt;9,Sum(Sales),If(SlsYear=2010 and SlsMonth&amp;gt;=9,Sum(Sales))) as Roll_12_Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;requires group by by all fields which are not used in any aggregation fuction.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;invalid expression error always due to missing group by.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;hope this helps you&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 08:54:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323368#M119157</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-09-05T08:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323369#M119158</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;See the attached updated sample might it will work for you &lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Anand&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 08:55:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323369#M119158</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2011-09-05T08:55:36Z</dc:date>
    </item>
    <item>
      <title>What is wrong with this formula?</title>
      <link>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323370#M119159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thank You all for your response. I forgot to do group by. BUt let me know one thing: if I dont put Sum in the script, it runs fine. But will it be right to do so? Anywway, I am putting Sum(&amp;lt;field&amp;gt;) in the expression. Thanks for your response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2011 08:57:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-is-wrong-with-this-formula/m-p/323370#M119159</guid>
      <dc:creator>montubhardwaj</dc:creator>
      <dc:date>2011-09-05T08:57:09Z</dc:date>
    </item>
  </channel>
</rss>

