<?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 issue in expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265712#M398758</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Team&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have using below expression to get last 6 months sales. It is not calculating for the last 6 months but only returns sales for the month selected. Kindly help if there is something to be modified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM ( {&amp;lt; Monyr = {"&amp;gt;=$(vSTART)&amp;lt;$(vEND)"} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where variables are defined as&lt;/P&gt;&lt;P&gt;vSTART=&amp;nbsp; date(MonthStart(Date(max(MonthYear),'M YYYY'),-6),'M YYYY')&lt;/P&gt;&lt;P&gt;vEND= =&amp;nbsp; num(MONTH(MonthYear),'0') &amp;amp;' '&amp;nbsp; &amp;amp; YEAR(MonthYear)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field Monyr is available as&amp;nbsp; 1 2016, 2 2016, 3 2016,......... 10 2016&amp;nbsp; ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Chintan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2017 05:54:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-01-18T05:54:57Z</dc:date>
    <item>
      <title>issue in expression</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265712#M398758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Team&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have using below expression to get last 6 months sales. It is not calculating for the last 6 months but only returns sales for the month selected. Kindly help if there is something to be modified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM ( {&amp;lt; Monyr = {"&amp;gt;=$(vSTART)&amp;lt;$(vEND)"} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where variables are defined as&lt;/P&gt;&lt;P&gt;vSTART=&amp;nbsp; date(MonthStart(Date(max(MonthYear),'M YYYY'),-6),'M YYYY')&lt;/P&gt;&lt;P&gt;vEND= =&amp;nbsp; num(MONTH(MonthYear),'0') &amp;amp;' '&amp;nbsp; &amp;amp; YEAR(MonthYear)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field Monyr is available as&amp;nbsp; 1 2016, 2 2016, 3 2016,......... 10 2016&amp;nbsp; ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Chintan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 05:54:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265712#M398758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-18T05:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: issue in expression</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265713#M398759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is MonthYear a field or a variable?&lt;/P&gt;&lt;P&gt;Is it text, or is it a numeric date field?&lt;/P&gt;&lt;P&gt;If text, how is it formatted?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Monyr is presumably a text field. This set expression will require a numeric date value or a different format if the field is text, or the comparisons will not work,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 06:10:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265713#M398759</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-01-18T06:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: issue in expression</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265714#M398760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Jonathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Monyr is a field and made in script as below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;num(month(Date))&amp;amp; ' '&amp;amp;Year(Date) as Monyr,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;data is stored as 1 2016, 2 2016, 3 2016.............10 2016 etc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Is it that I need to use num even in vSTART variable?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks &amp;amp; regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Chintan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2017 06:17:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265714#M398760</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-18T06:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: issue in expression</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265715#M398761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to convert Monyr to a numeric date field if you want to do this sort analysis - text compares with that format will not work. In the load, use this to define Monyr:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Date(Floor(Date), 'M yyyy') as Monyr,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the variables (also in the load):&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vSTART= =Date(MonthStart(Max(MonthYear)),-6),'M YYYY');&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;Set vEND= = &lt;SPAN style="font-size: 13.3333330154419px;"&gt;Date(Floor(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;MonthYear&lt;/SPAN&gt;), 'M yyyy');&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Note the double = signs&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, your set expression&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;&lt;EM&gt;=SUM ({&amp;lt;Monyr = {"&amp;gt;=$(vSTART) &amp;lt;$(vEND)"}&amp;gt;} Sales)&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 09:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265715#M398761</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-01-19T09:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: issue in expression</title>
      <link>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265716#M398762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply. I will try and let you know if I get the desired result.&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;Chintan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2017 10:15:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/issue-in-expression/m-p/1265716#M398762</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-19T10:15:15Z</dc:date>
    </item>
  </channel>
</rss>

