<?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 Last X Periods from Transformed Field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-X-Periods-from-Transformed-Field/m-p/1291789#M461346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to just get the latest 3 months/quarters/years to display in a chart. The set analysis I am using is below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= avg({&amp;lt; [Lead Stage] = {'Prospect','Suspect',''}, MonthName([Lead Create Date]) = {'&amp;gt;= Max(MonthName([Lead Create Date]) -3' }&amp;gt;}Today() - [Lead Create Date])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like the issue is that I am using the MonthName() function. Does anyone have any hints on how to handle this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 22 Jan 2017 23:57:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-01-22T23:57:41Z</dc:date>
    <item>
      <title>Last X Periods from Transformed Field</title>
      <link>https://community.qlik.com/t5/QlikView/Last-X-Periods-from-Transformed-Field/m-p/1291789#M461346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to just get the latest 3 months/quarters/years to display in a chart. The set analysis I am using is below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= avg({&amp;lt; [Lead Stage] = {'Prospect','Suspect',''}, MonthName([Lead Create Date]) = {'&amp;gt;= Max(MonthName([Lead Create Date]) -3' }&amp;gt;}Today() - [Lead Create Date])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems like the issue is that I am using the MonthName() function. Does anyone have any hints on how to handle this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2017 23:57:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-X-Periods-from-Transformed-Field/m-p/1291789#M461346</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-22T23:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Last X Periods from Transformed Field</title>
      <link>https://community.qlik.com/t5/QlikView/Last-X-Periods-from-Transformed-Field/m-p/1291790#M461347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right. QlikView's expression doesn't allow for you to use functions on the LHS of a set modifier..... You can try like 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;&lt;STRONG&gt;=Avg({&amp;lt;[Lead Stage] = {'Prospect','Suspect',''}, &lt;SPAN style="color: #ff0000; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;[Lead Create Date]&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000;"&gt; = {"=MonthName([Lead Create Date]) &amp;gt;= MonthName(AddMonths(Max(TOTAL [Lead Create Date]), -3))"}&lt;/SPAN&gt;&amp;gt;}Today() - [Lead Create Date])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or create a new field in the script (avoid using MonthName and use MonthStart with date format)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD &lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Lead Create Date]&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date(MonthStart(&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[Lead Create Date]&lt;/STRONG&gt;), 'MMM-YYYY')) as MonthYear&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;FROM ....;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then this&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Avg({&amp;lt;[Lead Stage] = {'Prospect','Suspect',''}, &lt;SPAN style="color: #ff0000;"&gt;MonthYear = {"$(='&amp;gt;=' &amp;amp; Date(MonthStart(Max(MonthYear), -3), 'MMM-YYYY'))"}&lt;/SPAN&gt;&amp;gt;}Today() - [Lead Create Date])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 02:06:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-X-Periods-from-Transformed-Field/m-p/1291790#M461347</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-23T02:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Last X Periods from Transformed Field</title>
      <link>https://community.qlik.com/t5/QlikView/Last-X-Periods-from-Transformed-Field/m-p/1291791#M461348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amazing Sunny! Thank you. I went with the first option so I didn't have to reload my data model. Do you think I will have major performance issues moving forward? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 13:35:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-X-Periods-from-Transformed-Field/m-p/1291791#M461348</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-01-23T13:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Last X Periods from Transformed Field</title>
      <link>https://community.qlik.com/t5/QlikView/Last-X-Periods-from-Transformed-Field/m-p/1291792#M461349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think so... but I am not 100% confident.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2017 13:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-X-Periods-from-Transformed-Field/m-p/1291792#M461349</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-23T13:37:56Z</dc:date>
    </item>
  </channel>
</rss>

