<?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-End Set Analysis Formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Month-End-Set-Analysis-Formula/m-p/130197#M19603</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you solve the problem?&lt;/P&gt;&lt;P&gt;Can I have my mark now?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Sep 2018 12:54:05 GMT</pubDate>
    <dc:creator>captain89</dc:creator>
    <dc:date>2018-09-17T12:54:05Z</dc:date>
    <item>
      <title>Current Month-End Set Analysis Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-End-Set-Analysis-Formula/m-p/130195#M19601</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 2 metrics in my dataset: Actuals and Forecast. Actuals show what has already happened and Forecast is what we predict we will spend in the future.&lt;/P&gt;&lt;P&gt;My fiscal year starts in September(Month 1, 1st Quarter) and Ends in August&lt;SPAN style="font-size: 13.3333px;"&gt;(Month 12, 4th Quarter). that is in the Master Calendar Script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This is a month-end dataset, so we are currently in September, the dashboard should show &lt;/SPAN&gt;Actual&lt;SPAN style="font-size: 10pt;"&gt; data for &lt;STRONG&gt;August&lt;/STRONG&gt;. Since September hasn't ended yet, Actuals for September will be $0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But Forecast data can be shown for any future months. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to calculate the &lt;STRONG&gt;&lt;EM&gt;current month-end's&lt;/EM&gt;&lt;/STRONG&gt; actuals, and the &lt;EM&gt;&lt;STRONG&gt;current quarter's&lt;/STRONG&gt;&lt;/EM&gt; actuals using Set Analysis Expression.&lt;/P&gt;&lt;P&gt;The current month-end would be the actuals for the month of August.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;The current quarter would be the actuals for the 4th Quarter Q4.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;But I cannot just do vMax_Month-1, because what if I am in the 1st month of the fiscal year, then my previous month will be based on a value of '0'.&lt;/P&gt;&lt;P&gt;How do i achieve this?&lt;/P&gt;&lt;P&gt;I have attached a sample qvw file and dataset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYear= fiscal year&lt;/P&gt;&lt;P&gt;FMonth= fiscal month&lt;/P&gt;&lt;P&gt;fMonth=&lt;SPAN style="font-size: 13.3333px;"&gt;fiscal month in numeric&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FQuarter= fiscal quarter&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;FQuarter_Num= fiscal quarter &lt;SPAN style="font-size: 13.3333px;"&gt;in numeric&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2018 00:13:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-End-Set-Analysis-Formula/m-p/130195#M19601</guid>
      <dc:creator>triekong</dc:creator>
      <dc:date>2018-09-15T00:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month-End Set Analysis Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-End-Set-Analysis-Formula/m-p/130196#M19602</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;try this:&lt;/P&gt;&lt;P&gt;In the script add these two fields:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Year + If(Month&amp;gt;=$(vFM), 1, 0))*100+ (Mod(Month-$(vFM), 12)+1)*1 as fYearMonth,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((Mod(Month-$(vFM), 12)+1)*1=1, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Year + If(Month&amp;gt;=$(vFM), 1, 0))*100+ (Mod(Month-$(vFM), 12)+1)*1-89, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Year + If(Month&amp;gt;=$(vFM), 1, 0))*100+ (Mod(Month-$(vFM), 12)+1)*1-1) as fYearMonth_1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set a variable like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;v_PreMonth&lt;/SPAN&gt;=max(fYearMonth_1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then your formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=' Current Month-End'&amp;amp;chr(39)&amp;amp;'s Actuals&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; '&amp;amp; Sum({&amp;lt;FQuarter=,FMonth=, [Date]= ,fYearMonth={$(v_PreMonth)}&amp;gt;}[Actuals])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 Sep 2018 11:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-End-Set-Analysis-Formula/m-p/130196#M19602</guid>
      <dc:creator>captain89</dc:creator>
      <dc:date>2018-09-15T11:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Current Month-End Set Analysis Formula</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Month-End-Set-Analysis-Formula/m-p/130197#M19603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you solve the problem?&lt;/P&gt;&lt;P&gt;Can I have my mark now?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Sep 2018 12:54:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Month-End-Set-Analysis-Formula/m-p/130197#M19603</guid>
      <dc:creator>captain89</dc:creator>
      <dc:date>2018-09-17T12:54:05Z</dc:date>
    </item>
  </channel>
</rss>

