<?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: Current Month, Prior Month Flags in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65595#M10901</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Is there a way to write these 2 expressions to write as Flags in Edit Script and then use them in UI?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Mar 2018 17:05:01 GMT</pubDate>
    <dc:creator>satishkurra</dc:creator>
    <dc:date>2018-03-07T17:05:01Z</dc:date>
    <item>
      <title>Current Month, Prior Month Flags</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65590#M10896</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;Currently i have the data as&lt;/P&gt;&lt;P&gt;Period, Amount&lt;/P&gt;&lt;P&gt;201711,100&lt;/P&gt;&lt;P&gt;201712,200&lt;/P&gt;&lt;P&gt;201801,300&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I DO NOT have date is my data, it is already aggregated by Period, Month and Year only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on this is there a way to dynamically get Current Month and Prior Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using below expression, but this fails as my current month is Jan 2018 and Prior Month is Dec 2017. If both current month and prior month exists in same year it works. If not it fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Year = {"$(=Max(Year))"},Month = {"$(=Num(Max(Month)))"}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Sum({&amp;lt;Year = {"$(=Max(Year))"},Month = {"$(=Num(Max(Month)-1))"}&amp;gt;}Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any dynamic way to get this worked every time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I do not have the data as of current month to use TODAY function. Right now my current month is Jan 2018 and Prior Month is Dec 2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Satish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 16:41:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65590#M10896</guid>
      <dc:creator>satishkurra</dc:creator>
      <dc:date>2018-03-07T16:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month, Prior Month Flags</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65591#M10897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Intead of using Month and Year separately, use a MonthYear field to do this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 16:43:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65591#M10897</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-03-07T16:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month, Prior Month Flags</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65592#M10898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Sunny said here, use you original Period field, which is a YearMonth field, it will simplify your expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 16:50:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65592#M10898</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-03-07T16:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month, Prior Month Flags</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65593#M10899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you tried peek function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 16:50:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65593#M10899</guid>
      <dc:creator>isingh30</dc:creator>
      <dc:date>2018-03-07T16:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month, Prior Month Flags</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65594#M10900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can easily create a YearMonth date field with &lt;EM&gt;Date#(Period, 'YYYYMM') as YearMonth. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Period,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num(Date#(Period, 'YYYYMM')) as YearMonth&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...source...&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The you can use expressions like these:&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Sum({&amp;lt;YearMonth = {"$(=max(YearMonth)"}&amp;gt;}Amount)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;=Sum({&amp;lt;YearMonth = {&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;"$(=num(MonthStart(max(YearMonth),-1))"&lt;/SPAN&gt;}&amp;gt;}Amount)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 16:51:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65594#M10900</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-03-07T16:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month, Prior Month Flags</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65595#M10901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Is there a way to write these 2 expressions to write as Flags in Edit Script and then use them in UI?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2018 17:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-Prior-Month-Flags/m-p/65595#M10901</guid>
      <dc:creator>satishkurra</dc:creator>
      <dc:date>2018-03-07T17:05:01Z</dc:date>
    </item>
  </channel>
</rss>

