<?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: Expression with a Function not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429200#M159996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need to add the TOTAL keyword within the sum to have the expression evaluate outside the current dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Mar 2013 05:08:16 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2013-03-12T05:08:16Z</dc:date>
    <item>
      <title>Expression with a Function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429197#M159993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;newbie &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; and being driven up the wall with set analysis etc &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i need to pull through the previous month in my dataset in order to display the previous months headcount of staff. Now this works outside of the expression in a text box, but when i add it as an expression is falls over and i dont know why!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help greatly appriciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works in textbox:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Date(addmonths(max(&lt;STRONG&gt;my_standard_date &lt;/STRONG&gt;),-1)) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doesnt work in expression where i need to count last months staff heads:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=sum({&amp;lt;my_standard_date = {'Date(addmonths(max(my_standard_date ),-1))'}&amp;gt;} staff_headcount)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 16:15:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429197#M159993</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2013-03-11T16:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with a Function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429198#M159994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Try this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=sum({&amp;lt;MonthFieldName=, YearFieldName=, QuarterFieldName=, my_standard_date = {'&amp;gt;=$(=Date(MonthStart(max(my_standard_date ),-1)))&amp;lt;&lt;/STRONG&gt;&lt;STRONG&gt;=$(=Date(MonthEnd(max(my_standard_date ),-1)))&lt;/STRONG&gt;&lt;STRONG&gt;'}&amp;gt;} staff_headcount)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exclude Month, Year, Quarter fields selection in the expression if you have any in your datamodel.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope this helps you.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Regards,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Jagan.&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 16:22:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429198#M159994</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-03-11T16:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with a Function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429199#M159995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks jagan - it only pulls back the current month though? it doesnt pull through the prior month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried your script without the month specifics i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=sum({&amp;lt;my_standard_date = {'&amp;gt;=$(=Date(MonthStart(max(my_standard_date ),-1)))&amp;lt;&lt;/STRONG&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;=$(=Date(MonthEnd(max(my_standard_date ),-1)))&lt;/STRONG&gt;&lt;STRONG style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;'}&amp;gt;} staff_headcount)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2013 16:31:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429199#M159995</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2013-03-11T16:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with a Function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429200#M159996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need to add the TOTAL keyword within the sum to have the expression evaluate outside the current dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 05:08:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429200#M159996</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2013-03-12T05:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with a Function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429201#M159997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;qlikview appears to be ignoring whatever is in the set expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so instead of evaluating what is in the expression to calculate the previous month it is just suming the staff headcount for whatever month the user has selected&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 09:41:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429201#M159997</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2013-03-12T09:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Expression with a Function not working</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429202#M159998</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i'm sure that it has to be a date format issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the data i'm pulling through is a datetime field in SQL: DD/MM/YYYY 00:00:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i wonder if QlikView isnt treating the data as such?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 15:27:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-with-a-Function-not-working/m-p/429202#M159998</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2013-03-12T15:27:07Z</dc:date>
    </item>
  </channel>
</rss>

