<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435510#M798391</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not entirely sure, What are you going here. Even thought i have like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;DateField = {"&amp;gt;=$(=Date(AddMonths(Max(DateField),-9),'Your Date Format Here')) &amp;lt;=$(=Date(Max(DateField), 'Your Date Format Here'))"}&amp;gt;} Tickets)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Some cases, This may works or won't work if we have missed date fields with at least 0 values. So, I would always generate Calendar script to date field for all dates. And, Finally this should work if MonthStart Date like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;DateField = {"&amp;gt;=$(=Date(MonthStart(AddMonths(Max(DateField),-9)),'Your Date Format Here')) &amp;lt;=$(=Date(Max(DateField), 'Your Date Format Here'))"}&amp;gt;} Tickets)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Note&lt;/SPAN&gt;&lt;/STRONG&gt; - If applicable, Please mark it as helpful and correct answer to close this thread. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Dec 2017 08:24:37 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2017-12-06T08:24:37Z</dc:date>
    <item>
      <title>Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435501#M798382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I have&amp;nbsp;&amp;nbsp; bar chart which should display always 9 months from current date.&lt;/P&gt;&lt;P&gt;this is December month therefore it should display from dec to April.(4 to 12)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The month is in number format it displays&amp;nbsp; for Jan- 1, Feb-2....and so on ... as shown in the the screenshot. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;IMG alt="month.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/185892_month.PNG" style="height: 32px; width: 620px;" /&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;&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;Iam using the the below expression expression to display 9 month data ..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Please correct me ..this is not working . &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The dimension is Month&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;expression :&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Sum ({&amp;lt;Month={"&amp;gt;=$(=date(addmonths(Month,-9),'MMM-YYYY'))&amp;lt;=$(=max(date(addmonths(Month,0)),'MMM-YYYY'))"}&amp;gt;}Tickets)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&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/Expression/m-p/1435501#M798382</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435502#M798383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If, Max(Month) returns 12 then should be this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Month = {"&amp;gt;=$(=Max(Month)-9) &amp;lt;=$(=Max(Month))"}&amp;gt;} Tickets)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 06:19:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression/m-p/1435502#M798383</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-06T06:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435503#M798384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil&lt;/P&gt;&lt;P&gt;Thanks for the reply ..&lt;/P&gt;&lt;P&gt;Next year it will show jan ..&lt;/P&gt;&lt;P&gt;So will this still diplay 9 month from Jan-2018 back to&amp;nbsp; May-2017?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;totally nine months from current date of Month...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 06:22:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression/m-p/1435503#M798384</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2017-12-06T06:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435504#M798385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have date field in data model if so i suggest&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;Sum ({&amp;lt;Datefield={"&amp;gt;=$(=date(addmonths(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Datefield&lt;/SPAN&gt;,-9))) &amp;lt;=$(=max(date(addmonths(Month,0))))"}&amp;gt;} Tickets)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 06:30:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression/m-p/1435504#M798385</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-12-06T06:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435505#M798386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;100% agree, But in your image it is showing as numbers for month. But, In your statement using MMM-YYYY format for Month to degrade. What does you mean that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 06:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression/m-p/1435505#M798386</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-06T06:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435506#M798387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anil... &lt;/P&gt;&lt;P&gt;Your Expression works for 9 months ...and the data is accurate..&lt;/P&gt;&lt;P&gt;So i am going ahead with this..&lt;/P&gt;&lt;P&gt;My only question will it always show nine months even if it eneters the next year jan or Feb ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 07:06:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression/m-p/1435506#M798387</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2017-12-06T07:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435507#M798388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, It is? But the concept we need to understand the concept of Forecast data. that is the case you need to bifurcate till today only not in forecast data like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;Month = {"&amp;gt;=$(=Max(Month)-9) &amp;lt;=$(=Num(Month(Today())))"}&amp;gt;} Tickets)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 07:09:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression/m-p/1435507#M798388</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-06T07:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435508#M798389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anil &lt;/P&gt;&lt;P&gt;got it.&lt;/P&gt;&lt;P&gt;Just i have one more query .&lt;/P&gt;&lt;P&gt;In one of my other chart the date format is like 1/1/2017&amp;nbsp; as shown in the screenshot.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Date12PNG.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/185893_Date12PNG.PNG" style="height: 33px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and here also i need to show till nine months ...&lt;/P&gt;&lt;P&gt;with your logic i tried to use expression like below &lt;/P&gt;&lt;P&gt;Sum({&amp;lt;Month = {"&amp;gt;=$(=Date(Max(Month))-9) &amp;lt;=$(=Date(Max(Month)))"}&amp;gt;} Tickets)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;but this doenst give me the proper result ..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;do i need to make any specific change here ?&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 07:26:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression/m-p/1435508#M798389</guid>
      <dc:creator>smilingjohn</dc:creator>
      <dc:date>2017-12-06T07:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435509#M798390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're worried about year then you need to make sure your definition of Month has that concept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use something like this to define Month:&lt;/P&gt;&lt;P&gt;Dual(Year(DateField) &amp;amp; '-' &amp;amp; Month(DateField), MonthStart(DateField)) as YearMonth&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or something prettier...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the field has been dualed with a number that recognises the year and month, then you can think of substracting a number of Months as you've been advised in the other posts&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 07:47:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression/m-p/1435509#M798390</guid>
      <dc:creator>luismadriz</dc:creator>
      <dc:date>2017-12-06T07:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435510#M798391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not entirely sure, What are you going here. Even thought i have like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;DateField = {"&amp;gt;=$(=Date(AddMonths(Max(DateField),-9),'Your Date Format Here')) &amp;lt;=$(=Date(Max(DateField), 'Your Date Format Here'))"}&amp;gt;} Tickets)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Some cases, This may works or won't work if we have missed date fields with at least 0 values. So, I would always generate Calendar script to date field for all dates. And, Finally this should work if MonthStart Date like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;DateField = {"&amp;gt;=$(=Date(MonthStart(AddMonths(Max(DateField),-9)),'Your Date Format Here')) &amp;lt;=$(=Date(Max(DateField), 'Your Date Format Here'))"}&amp;gt;} Tickets)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Note&lt;/SPAN&gt;&lt;/STRONG&gt; - If applicable, Please mark it as helpful and correct answer to close this thread. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 08:24:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression/m-p/1435510#M798391</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-06T08:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Expression/m-p/1435511#M798392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simple use but no need to change date format if required then change.&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;Sum ({&amp;lt;Datefield={"&amp;gt;=$(=Date(addmonths(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Datefield&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;,-9))) &amp;lt;=$(=max(Date(addmonths(Month,0))))"}&amp;gt;} Tickets)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 08:30:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression/m-p/1435511#M798392</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-12-06T08:30:20Z</dc:date>
    </item>
  </channel>
</rss>

