<?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: Invalid expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060311#M930399</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, now it works.&lt;/P&gt;&lt;P&gt;there was a field not in the group by&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Mar 2016 09:28:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-03-13T09:28:20Z</dc:date>
    <item>
      <title>Invalid expression</title>
      <link>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060308#M930396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Hi, i am new to qlikview and I've a problem..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I have to calculate CC (continuous compounding) in the script,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I use this expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;DatiTmp:&lt;/P&gt;&lt;P&gt;NoConcatenate LOAD *, if(Azione = Peek(Azione, -1), Peek([Adj Close], -1), '-') AS PreviousClose, Date(MonthStart(Date), 'YYYY-MMM') AS YearMonth Resident Dati;&lt;/P&gt;&lt;P&gt;DROP Table Dati;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DatiCC:&lt;/P&gt;&lt;P&gt;LOAD *, (log(Avg(PreviousClose)) * (-1) + log(Avg([Adj Close]))) AS CC Resident DatiTmp&lt;/P&gt;&lt;P&gt;Group By Year, Month, Azione, Date, Open, High, Low, Close, Volume, [Adj Close], PreviousClose, YearMonth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but when I try to reload the script something is wrong and appear a script error (Invalid Expression)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What could be the problem?&lt;/P&gt;&lt;P&gt;I'm sure that the expression is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Thanks in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060308#M930396</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid expression</title>
      <link>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060309#M930397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Federica, maybe is becuse of the group by, that clause must contain every field that is not in an aggregation function. I'm not sure of this because you load fields with '*' and I don't know how many field has that table, to make a test you can try loading only the fields in the Group By, this way you can test is the error was in there:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DatiCC:&lt;/P&gt;&lt;P&gt;LOAD Year, Month, Azione, Date, Open, High, Low, Close, Volume, [Adj Close], PreviousClose, YearMonth,&lt;/P&gt;&lt;P&gt;(log(Avg(PreviousClose)) * (-1) + log(Avg([Adj Close]))) AS CC Resident DatiTmp&lt;/P&gt;&lt;P&gt;Group By Year, Month, Azione, Date, Open, High, Low, Close, Volume, [Adj Close], PreviousClose, YearMonth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Mar 2016 15:46:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060309#M930397</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-03-12T15:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid expression</title>
      <link>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060310#M930398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;'*' is causing error it seems, You are grouping your transactions based on Group By fields so any higher granular field if mentioned after load which is not there in group by will contradict the meaning of grouping logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure but fields &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Adj Close], PreviousClose&amp;nbsp;&amp;nbsp; if mentioned in Group By then the newly created field '&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CC' will appear in front of every value of Adj CLose and Previous Close. So the avg function won't work as desired AFAIK.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Mar 2016 04:22:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060310#M930398</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2016-03-13T04:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid expression</title>
      <link>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060311#M930399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, now it works.&lt;/P&gt;&lt;P&gt;there was a field not in the group by&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Mar 2016 09:28:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060311#M930399</guid>
      <dc:creator />
      <dc:date>2016-03-13T09:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid expression</title>
      <link>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060312#M930400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Try to check all the fields in Group By clause, may be you are missing some field in Group By Clause which is available in that load statement. Also use relevant aggregation function on Measures instead of including in Group by clause for eg. Previous Close, Close Volume&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Instead of using * , list out the field names(in load statement) available in Group By Clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Mar 2016 09:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Invalid-expression/m-p/1060312#M930400</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-03-13T09:39:49Z</dc:date>
    </item>
  </channel>
</rss>

