<?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 Set Analysis Roll Up with Rolling 13 Calculated Dimension? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239453#M90080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, trying to make sense of what you're doing.&lt;/P&gt;&lt;P&gt;So FiscalPeriod is YYYYMM, except that you didn't make it a date, just a number. I'd have done this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;date(date#(FiscalPeriod,'YYYYMM'),'YYYYMM') as FiscalPeriod&lt;/P&gt;&lt;P&gt;Then you have num(right(FiscalPeriod,2)) all over the place. I'd have done something like this during the load:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;month(date#(FiscalPeriod,'YYYYMM')) as FiscalMonth&lt;/P&gt;&lt;P&gt;Now let's see if I can make more sense of your calculated dimension:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Num(IF($(vCP)=NUM(Right(FiscalPeriod,2)),13&lt;BR /&gt; ,IF($(vCP)&amp;lt;NUM(Right(FiscalPeriod,2)),NUM(Right(FiscalPeriod,2))-$(vCP)&lt;BR /&gt; ,13-($(vCP)-NUM(Right(FiscalPeriod,2)))))&amp;amp;'.'&amp;amp;Num(Right(FiscalPeriod,2)))&lt;/P&gt;&lt;P&gt;Would become this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;num(if($(vCP)=FiscalMonth,13&lt;BR /&gt; ,if($(vCP)&amp;lt;FiscalMonth,FiscalMonth-$(vCP)&lt;BR /&gt; ,13-($(vCP)-FiscalMonth)))&amp;amp;'.'&amp;amp;FiscalMonth)&lt;/P&gt;&lt;P&gt;Which simplifies to this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;num(mod(FiscalMonth-$(vCP)-1,13)+1&amp;amp;'.'&amp;amp;FiscalMonth)&lt;/P&gt;&lt;P&gt;Which you could make into a table in the script by converting vCP into a field instead of a variable:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;vCP,FiscalMonth,SomePeriodThing&lt;BR /&gt;1,1,13.1&lt;BR /&gt;1,2,1.2&lt;BR /&gt;1,3,2.3&lt;BR /&gt;1,4,3.4&lt;BR /&gt;...&lt;BR /&gt;4,1,10.1&lt;BR /&gt;4,2,11.2&lt;BR /&gt;4,3,12.3&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;And then your dimension is just this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;SomePeriodThing&lt;/P&gt;&lt;P&gt;So far so good I hope. Now what was your question? Something about this expression?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;(Sum ( {1&amp;lt; FiscalPeriod ={"&amp;gt;=$(=Max(FiscalPeriod)-99) &amp;lt;=$(=Max(FiscalPeriod))"}, Department= {'57'}, StoreNo = {"$(=GetFieldSelections(StoreNo))"} &amp;gt;} StartPayRateSum)) / (Sum ( {1&amp;lt; FiscalPeriod ={"&amp;gt;=$(=Max(FiscalPeriod)-99) &amp;lt;=$(=Max(FiscalPeriod))"}, Department= {'57'}, StoreNo = {"$(=GetFieldSelections(StoreNo))"} &amp;gt;} StartPayRateNumEmp))&lt;/P&gt;&lt;P&gt;OK, max(Fiscalperiod) is going to be some number like 201004. Subtract 99 is the same as subtract 100 add 1, so you're trying to subtract a year and add a month. Except that it doesn't work, because 201012 - 99 = 200913. There's no 13th month. Unless somehow that's part of your rolling 13? Gah, yes, you do indeed have a 200913 FiscalPeriod, whatever that means. In any case, it means all the work I've done so far is wrong.&lt;/P&gt;&lt;P&gt;So I give up. I can't decipher what you're currently doing, so I can't even get to the point of figuring out what you're TRYING to do, and then trying to solve the problem, whatever the problem is. I bet it isn't anything difficult, but that's easy to say when I don't even understand what you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 May 2010 20:19:29 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-05-13T20:19:29Z</dc:date>
    <item>
      <title>Set Analysis Roll Up with Rolling 13 Calculated Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239450#M90077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Data: Master Table - Includes Calendar. I've outer joined our Stores table to our Calendar table, thus creating Master using Store# and Dates. Store# is the base level, then Area, then Division, then Company.&lt;/P&gt;&lt;P&gt;Wage Rate Table - Links to the Master table, on Store number, Year, Period. Includes the # of hires, the sum of their starting rates, as well as the average of all employes wages, broken down by department (department = driver, server, production, management, etc..)&lt;/P&gt;&lt;P&gt;Im using a Rolling 13 Calculated Dimension:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=Num(IF($(vCP)=NUM(Right(FiscalPeriod,2)),13,If($(vCP)&amp;lt;NUM(Right(FiscalPeriod,2)),NUM(Right(FiscalPeriod,2))-$(vCP),13-($(vCP)-NUM(Right(FiscalPeriod,2)))))&amp;amp;'.'&amp;amp;Num(Right(FiscalPeriod,2)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;vCP = Current Period&lt;/P&gt;&lt;P&gt;FiscalPeriod = YearPeriod as in 201005.&lt;/P&gt;&lt;P&gt;The Calculation creates a rolling 13 based on the selected Period. Meaning if I select Year = 2009 and Period = 4, the dimensions are 1.5, 2.6, 3.7, 4.8, 5.9, 6.10, 7.11, 8.12, 9.13, 10.1, 11.2, 12.3, 13.4. Simply put into words, # In Sequence.Period.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression includes set modifiers to filter by selected stores, as well as selected year period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=(Sum ( {1&amp;lt; FiscalPeriod ={"&amp;gt;=$(=Max(FiscalPeriod)-99) &amp;lt;=$(=Max(FiscalPeriod))"}, Department= {'57'}, StoreNo = {"$(=GetFieldSelections(StoreNo))"} &amp;gt;} StartPayRateSum)) / (Sum ( {1&amp;lt; FiscalPeriod ={"&amp;gt;=$(=Max(FiscalPeriod)-99) &amp;lt;=$(=Max(FiscalPeriod))"}, Department= {'57'}, StoreNo = {"$(=GetFieldSelections(StoreNo))"} &amp;gt;} StartPayRateNumEmp))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;How can I get this to roll up in the Hierarchy described here: Store# is the base level, then Area, then Division, then Company.&lt;/P&gt;&lt;P&gt;Also how do can make it to where I can select multiple stores, and have the calculation still work&lt;/P&gt;&lt;P&gt;This is being displayed in a line graph. The visual representation show over 13 periods the fluxuation of Pay rates.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 18:34:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239450#M90077</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-12T18:34:21Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Roll Up with Rolling 13 Calculated Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239451#M90078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;NOTE: Store# 12243, and 40000 are not legit store#s.&lt;/P&gt;&lt;P&gt;I uploaded what Im working with. How can I get it to roll up?&lt;/P&gt;&lt;P&gt;Bueller?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 21:23:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239451#M90078</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-12T21:23:59Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Roll Up with Rolling 13 Calculated Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239452#M90079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can someone at least deny the possibility please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 May 2010 16:30:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239452#M90079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-13T16:30:22Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Roll Up with Rolling 13 Calculated Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239453#M90080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, trying to make sense of what you're doing.&lt;/P&gt;&lt;P&gt;So FiscalPeriod is YYYYMM, except that you didn't make it a date, just a number. I'd have done this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;date(date#(FiscalPeriod,'YYYYMM'),'YYYYMM') as FiscalPeriod&lt;/P&gt;&lt;P&gt;Then you have num(right(FiscalPeriod,2)) all over the place. I'd have done something like this during the load:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;month(date#(FiscalPeriod,'YYYYMM')) as FiscalMonth&lt;/P&gt;&lt;P&gt;Now let's see if I can make more sense of your calculated dimension:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Num(IF($(vCP)=NUM(Right(FiscalPeriod,2)),13&lt;BR /&gt; ,IF($(vCP)&amp;lt;NUM(Right(FiscalPeriod,2)),NUM(Right(FiscalPeriod,2))-$(vCP)&lt;BR /&gt; ,13-($(vCP)-NUM(Right(FiscalPeriod,2)))))&amp;amp;'.'&amp;amp;Num(Right(FiscalPeriod,2)))&lt;/P&gt;&lt;P&gt;Would become this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;num(if($(vCP)=FiscalMonth,13&lt;BR /&gt; ,if($(vCP)&amp;lt;FiscalMonth,FiscalMonth-$(vCP)&lt;BR /&gt; ,13-($(vCP)-FiscalMonth)))&amp;amp;'.'&amp;amp;FiscalMonth)&lt;/P&gt;&lt;P&gt;Which simplifies to this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;num(mod(FiscalMonth-$(vCP)-1,13)+1&amp;amp;'.'&amp;amp;FiscalMonth)&lt;/P&gt;&lt;P&gt;Which you could make into a table in the script by converting vCP into a field instead of a variable:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;vCP,FiscalMonth,SomePeriodThing&lt;BR /&gt;1,1,13.1&lt;BR /&gt;1,2,1.2&lt;BR /&gt;1,3,2.3&lt;BR /&gt;1,4,3.4&lt;BR /&gt;...&lt;BR /&gt;4,1,10.1&lt;BR /&gt;4,2,11.2&lt;BR /&gt;4,3,12.3&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;And then your dimension is just this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;SomePeriodThing&lt;/P&gt;&lt;P&gt;So far so good I hope. Now what was your question? Something about this expression?&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;(Sum ( {1&amp;lt; FiscalPeriod ={"&amp;gt;=$(=Max(FiscalPeriod)-99) &amp;lt;=$(=Max(FiscalPeriod))"}, Department= {'57'}, StoreNo = {"$(=GetFieldSelections(StoreNo))"} &amp;gt;} StartPayRateSum)) / (Sum ( {1&amp;lt; FiscalPeriod ={"&amp;gt;=$(=Max(FiscalPeriod)-99) &amp;lt;=$(=Max(FiscalPeriod))"}, Department= {'57'}, StoreNo = {"$(=GetFieldSelections(StoreNo))"} &amp;gt;} StartPayRateNumEmp))&lt;/P&gt;&lt;P&gt;OK, max(Fiscalperiod) is going to be some number like 201004. Subtract 99 is the same as subtract 100 add 1, so you're trying to subtract a year and add a month. Except that it doesn't work, because 201012 - 99 = 200913. There's no 13th month. Unless somehow that's part of your rolling 13? Gah, yes, you do indeed have a 200913 FiscalPeriod, whatever that means. In any case, it means all the work I've done so far is wrong.&lt;/P&gt;&lt;P&gt;So I give up. I can't decipher what you're currently doing, so I can't even get to the point of figuring out what you're TRYING to do, and then trying to solve the problem, whatever the problem is. I bet it isn't anything difficult, but that's easy to say when I don't even understand what you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 May 2010 20:19:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239453#M90080</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-05-13T20:19:29Z</dc:date>
    </item>
    <item>
      <title>Set Analysis Roll Up with Rolling 13 Calculated Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239454#M90081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have 28 days per period, and 13 periods per year. That is why we have the convoluted structure to our Fiscal Year over 13 periods Calculated dimension. The 1.13, 2.1, 3.2, etc should end with 13.12 if period 12 is selected. Say year 2009 is selected, then 1.13 would = period 13 of 2008 and 13.12 would be period 12 of 2009, which should be the last Dimension on the Line Graph.&lt;/P&gt;&lt;P&gt;I have it working based on Selecting Year and Period and StoreNo.&lt;/P&gt;&lt;P&gt;Say we have 7 stores in an Area, 5 areas per division, and 3 divisions within the company. All I want to do is get the Set Analysis to roll up within the Hierarcy of our Company Structure.&lt;/P&gt;&lt;P&gt;I assume it isn't possible unless I include Area, Division, and Company into the Set Modifiers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 May 2010 20:45:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Roll-Up-with-Rolling-13-Calculated-Dimension/m-p/239454#M90081</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-13T20:45:31Z</dc:date>
    </item>
  </channel>
</rss>

