<?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 help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009314#M948502</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if you YearMonth field is a date field and how this is getting created in the script, but if it is truely a date field, something like this should work;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;Receipt = {1}, YearMonth = {"$(=Date(Max(YearMonth), 'YYYY - MM'))"}&amp;gt;}REF)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Dec 2015 11:30:40 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-12-14T11:30:40Z</dc:date>
    <item>
      <title>Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009312#M948500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ref&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YearMonth&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Receipt&lt;/P&gt;&lt;P&gt;222&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015 -11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;333&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015 - 12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;231&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015 - 12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;156&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2015 - 12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can you give me a FIXED expression for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;COUNT&lt;/SPAN&gt; of &lt;SPAN style="color: #ff0000;"&gt;'REF'&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;WHERE &lt;SPAN style="color: #ff0000;"&gt;'YearMonth' &lt;SPAN style="color: #333300; text-decoration: underline;"&gt;&lt;STRONG&gt;is current&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; and &lt;SPAN style="color: #ff0000;"&gt;'Receipt'&lt;/SPAN&gt; &lt;STRONG&gt;= 1&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:27:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009312#M948500</guid>
      <dc:creator />
      <dc:date>2015-12-14T11:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009313#M948501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;Count({&amp;lt;Receipt={1}, YearMonth={'$(=Year(Today())&amp;amp;' - '&amp;amp;Num(Month(today())))'}&amp;gt;}REF)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Space before and after '-', you have to be careful about.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:30:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009313#M948501</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-12-14T11:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009314#M948502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if you YearMonth field is a date field and how this is getting created in the script, but if it is truely a date field, something like this should work;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Count({&amp;lt;Receipt = {1}, YearMonth = {"$(=Date(Max(YearMonth), 'YYYY - MM'))"}&amp;gt;}REF)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009314#M948502</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-14T11:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009315#M948503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be this:&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;=Count({&amp;lt;Receipt={'1'}, YearMonth={'$(=max(num(&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;YearMonth&lt;/STRONG&gt;))'}&amp;gt;} REF)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:34:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009315#M948503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-14T11:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009316#M948504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately this has not given me a result as I have records for the current month and nothing is displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:42:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009316#M948504</guid>
      <dc:creator />
      <dc:date>2015-12-14T11:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009317#M948505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem might be related to how the YearMonth field is getting calculated in the script. Are you using a function like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date(DateField, 'YYYY - MM') as YearMonth?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:44:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009317#M948505</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-14T11:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009318#M948506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression states ok but no result - so this must be the way I have loaded the date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My YearMonth field in load is:&lt;/P&gt;&lt;P&gt;CreatedOn,&amp;nbsp; (comes in as a date time stamp from SQL)&lt;/P&gt;&lt;P&gt;Convert(varchar,year([CreatedOn])) + '-' +&amp;nbsp; convert(varchar,month([CreatedOn])) as YearMonth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry very new to this!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009318#M948506</guid>
      <dc:creator />
      <dc:date>2015-12-14T11:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009319#M948507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Balraj&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see my reply to Sunny.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still having errors, probably due to date format ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:45:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009319#M948507</guid>
      <dc:creator />
      <dc:date>2015-12-14T11:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009320#M948508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emma, tresesco expression seems ok, can you ckeck the case sensitivity?. I.e. 'Ref' instead of 'REF'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also confirm the YearMonth format, there is an space before and after the dash ( - )?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:47:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009320#M948508</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-12-14T11:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009321#M948509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not an expert in SQL, but this seems like text instead of date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;SPAN style="color: #ff0000;"&gt;Date(Date#(YearMonth, 'YYYY-MM'), 'YYYY-MM') as YearMonth&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SELECT SQL&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&gt;CreatedOn,&amp;nbsp; (comes in as a date time stamp from SQL)&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&gt;Convert(varchar,year([CreatedOn])) + '-' +&amp;nbsp; convert(varchar,month([CreatedOn])) as YearMonth,&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;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and then this expression:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&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="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count({&amp;lt;Receipt = {1}, YearMonth = {"$(=Date(Max(YearMonth), 'YYYY-MM'))"}&amp;gt;}REF)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 11:49:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009321#M948509</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-12-14T11:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009322#M948510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this case should the suggestion from &lt;A href="https://community.qlik.com/qlik-users/26418"&gt;tresesco&lt;/A&gt; work if you removed the additionally spaces within ' - '. In general it's better to use always real dates in a pure numeric format for all matching and calculations. It enabled for example to compare such YearMonth field with &amp;gt;= or &amp;lt;= which isn't possible with a string like in your sql. Often it is helpful to use a master-calendar for this: &lt;A href="https://community.qlik.com/docs/DOC-8843"&gt;How to use - Master-Calendar and Date-Values&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 12:02:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009322#M948510</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-12-14T12:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Expression help</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009323#M948511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Emma,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to execute the formula without date-parameters. If it works, you know it is the data, if not, it may be other things as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Count({&amp;lt;Receipt = {1}}&amp;gt;}REF)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Dec 2015 13:36:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-help/m-p/1009323#M948511</guid>
      <dc:creator>puttemans</dc:creator>
      <dc:date>2015-12-14T13:36:44Z</dc:date>
    </item>
  </channel>
</rss>

