<?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: Incorrect expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938610#M976261</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The above posts correct the syntax error in your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the format of Weekyear? Is it text or numeric? The QV Weekyear function returns a year value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If weekyear means the week number in the year, then max(Weekyear) will not work correctly over the year end (week1 - 1 = week52 of prior year). You need to do proper date calculation - do you have a date field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Aug 2015 11:56:04 GMT</pubDate>
    <dc:creator>jonathandienst</dc:creator>
    <dc:date>2015-08-31T11:56:04Z</dc:date>
    <item>
      <title>Incorrect expression</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938606#M976257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am looking to make a sum of &lt;SPAN style="font-size: 13.3333330154419px;"&gt;PrixVente when &lt;SPAN style="font-size: 13.3333330154419px;"&gt;[Structure] ={'1174*'} and for the last year , &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;the following expression returns wrong values , how to correct it ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(IsNull(GetFieldSelections(Week,'*')),Sum({$&amp;lt;Year={$(=max(Year-1))}&amp;gt;}{&amp;lt;[Structure] ={'1174*'}&amp;gt;}PrixVente)&lt;/P&gt;&lt;P&gt;,Sum({$&amp;lt;Weekyear= {$(=max(Weekyear-1))}&amp;gt;}{&amp;lt;[Structure] ={'1174*'}&amp;gt;}PrixVente))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 11:28:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938606#M976257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-31T11:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect expression</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938607#M976258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(IsNull(GetFieldSelections(Week)),Sum({$&amp;lt;Year={'$(=max(Year)-1)'} ,[Structure] ={"1174*"}&amp;gt;}PrixVente)&lt;/P&gt;&lt;P&gt;,Sum({$&amp;lt;Weekyear= {'$(=max(Weekyear)-1)'},[Structure] ={"1174*"}&amp;gt;}PrixVente))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 11:34:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938607#M976258</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2015-08-31T11:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect expression</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938608#M976259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try this&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;=if(IsNull(GetFieldSelections(Week)),Sum({$&amp;lt;Year={$(=(max(Year&lt;SPAN style="; color: #ff0000;"&gt;&lt;STRONG&gt;)-1&lt;/STRONG&gt;&lt;/SPAN&gt;))}&amp;gt;}{&amp;lt;[Structure] ={'1174*'}&amp;gt;}PrixVente)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;,Sum({$&amp;lt;Weekyear= {$(=(max(Weekyear&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;)-1)&lt;/STRONG&gt;&lt;/SPAN&gt;)}&amp;gt;}{&amp;lt;[Structure] ={'1174*'}&amp;gt;}PrixVente))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 11:35:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938608#M976259</guid>
      <dc:creator>qlikmsg4u</dc:creator>
      <dc:date>2015-08-31T11:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect expression</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938609#M976260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum( {$ &amp;lt;Year={$(=max(Year)-1)},Structure ={"1174*"}&amp;gt;} PrixVente)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;same for WeekYear&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 11:36:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938609#M976260</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-08-31T11:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect expression</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938610#M976261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The above posts correct the syntax error in your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the format of Weekyear? Is it text or numeric? The QV Weekyear function returns a year value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If weekyear means the week number in the year, then max(Weekyear) will not work correctly over the year end (week1 - 1 = week52 of prior year). You need to do proper date calculation - do you have a date field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 11:56:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938610#M976261</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-08-31T11:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Incorrect expression</title>
      <link>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938611#M976262</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 this:&lt;/P&gt;&lt;P&gt;=if(IsNull(GetFieldSelections(Week,'*')),Sum({&amp;lt;Year={'$(=max(Year)-1)'},[Structure] ={'1174*'}&amp;gt;}PrixVente)&lt;/P&gt;&lt;P&gt;,Sum({&amp;lt;Weekyear= {'$(=max(Weekyear)-1)'},[Structure] ={'1174*'}&amp;gt;}PrixVente))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 12:33:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Incorrect-expression/m-p/938611#M976262</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-31T12:33:34Z</dc:date>
    </item>
  </channel>
</rss>

