<?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: Set Analysis Calculation Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Re-Set-Analysis-Calculation-Help/m-p/295786#M109756</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John.&amp;nbsp; You've actually helped me out in the past with a month over month delta report using your AsOf technique:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: AsOfYearMonth&lt;/P&gt;&lt;P&gt;Expression: MonthsBack(0,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked great.&amp;nbsp; My new dilemma is with line charts that are a mixture of quarters and months.&amp;nbsp; For example, a user can select Q1 2010 through Q1 2011 plus Apr 2011, May 2011, and Jun 2011 from my Range field to display annualized monthly attrition rates.&amp;nbsp; Everything works because my expressions are based on current quarter or month.&amp;nbsp; However, the monthly calculation has since changed, so part of the expression for Apr 2011, May 2011, and Jun 2011 has to look at the previous month's headcount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After reading through numerous AsOf examples last night, I'm stumped as to how to create a new AsOf field that is a combination of Quarters and Months.&amp;nbsp; I tried placing the AsOf code after my JOIN INTERVALMATCH section, but that didn't work.&amp;nbsp; So after creating my quarterly and monthly periods, I'm attempting to do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LEFT JOIN (Range) IntervalMatch (feeddate) LOAD RangeStart, RangeEnd RESIDENT Range;&lt;/P&gt;&lt;P&gt;AsOf2:&lt;BR /&gt;LOAD&lt;BR /&gt; Range as AsOfRange&lt;BR /&gt;,1 as CurrentMonthFlag&lt;BR /&gt;,Range&lt;BR /&gt;RESIDENT Range&lt;BR /&gt;;&lt;BR /&gt;CONCATENATE (AsOf2)&lt;BR /&gt;LOAD&lt;BR /&gt; Range as AsOfRange&lt;BR /&gt;,1 as PreviousMonthFlag&lt;BR /&gt;,if(substringcount('Jan.Feb.Mar.Apr.May.Jun.Jul.Aug.Sep.Aug.Sep.Oct.Nov.Dec',Range)&amp;gt;0, text(date(addmonths(feeddate,-1),'MMM YYYY'))) as Range&lt;BR /&gt;RESIDENT Range&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;Please let me know if you can help.&amp;nbsp; Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jul 2011 13:06:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-07-20T13:06:26Z</dc:date>
    <item>
      <title>Re: Set Analysis Calculation Help</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Set-Analysis-Calculation-Help/m-p/295786#M109756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John.&amp;nbsp; You've actually helped me out in the past with a month over month delta report using your AsOf technique:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension: AsOfYearMonth&lt;/P&gt;&lt;P&gt;Expression: MonthsBack(0,1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked great.&amp;nbsp; My new dilemma is with line charts that are a mixture of quarters and months.&amp;nbsp; For example, a user can select Q1 2010 through Q1 2011 plus Apr 2011, May 2011, and Jun 2011 from my Range field to display annualized monthly attrition rates.&amp;nbsp; Everything works because my expressions are based on current quarter or month.&amp;nbsp; However, the monthly calculation has since changed, so part of the expression for Apr 2011, May 2011, and Jun 2011 has to look at the previous month's headcount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After reading through numerous AsOf examples last night, I'm stumped as to how to create a new AsOf field that is a combination of Quarters and Months.&amp;nbsp; I tried placing the AsOf code after my JOIN INTERVALMATCH section, but that didn't work.&amp;nbsp; So after creating my quarterly and monthly periods, I'm attempting to do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;LEFT JOIN (Range) IntervalMatch (feeddate) LOAD RangeStart, RangeEnd RESIDENT Range;&lt;/P&gt;&lt;P&gt;AsOf2:&lt;BR /&gt;LOAD&lt;BR /&gt; Range as AsOfRange&lt;BR /&gt;,1 as CurrentMonthFlag&lt;BR /&gt;,Range&lt;BR /&gt;RESIDENT Range&lt;BR /&gt;;&lt;BR /&gt;CONCATENATE (AsOf2)&lt;BR /&gt;LOAD&lt;BR /&gt; Range as AsOfRange&lt;BR /&gt;,1 as PreviousMonthFlag&lt;BR /&gt;,if(substringcount('Jan.Feb.Mar.Apr.May.Jun.Jul.Aug.Sep.Aug.Sep.Oct.Nov.Dec',Range)&amp;gt;0, text(date(addmonths(feeddate,-1),'MMM YYYY'))) as Range&lt;BR /&gt;RESIDENT Range&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;Please let me know if you can help.&amp;nbsp; Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 13:06:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Set-Analysis-Calculation-Help/m-p/295786#M109756</guid>
      <dc:creator />
      <dc:date>2011-07-20T13:06:26Z</dc:date>
    </item>
  </channel>
</rss>

