<?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 Rolling 12 Months Time Dimensions in SAS Web Report Studio</title>
    <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Rolling-12-Months-Time-Dimensions/m-p/52989#M996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; John, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where are you trying to add the MDX code? Please send me an example of the MDX you are trying to write. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Feb 2012 16:12:36 GMT</pubDate>
    <dc:creator>RMP</dc:creator>
    <dc:date>2012-02-14T16:12:36Z</dc:date>
    <item>
      <title>Rolling 12 Months Time Dimensions</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Rolling-12-Months-Time-Dimensions/m-p/52988#M995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gday,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to put some additional filters into a SAS Web Report via an OLAP Cube or Information Map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;I assume I'd have to edit the OLAP cube in DI Studio of OLAP Cube Studio and &lt;EM&gt;Add &lt;/EM&gt;a &lt;EM&gt;Calculated Member. &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;EM&gt; &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;This allows me to apply a Rolling 12 months calculation on &lt;EM&gt;one &lt;/EM&gt;measure.&amp;nbsp; I've got over 20 measures and I want to also do YTD, Prior YTD, Prior Rolling 12 Months, Rolling 3 Months, Prior Rolling 3 Months.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;So I could do this process for all the measures for all the calculations I want, but that does feel particularly efficient or good in the long run.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I don't know MDX at all, and a lot of results I've found for this kind of feature, just have a line or two of MDX code, but I'm not able to apply any of them, changing the values to something I have always yields an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/thread/12865?tstart=100"&gt;http://communities.sas.com/thread/12865?tstart=100&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which had:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;aggregate(qtd(&lt;A _jive_internal="true" href="https://communities.sas.com/message/50739#50739"&gt;Re: Sum(YTD(),[MEASURES].[])&lt;/A&gt;.CurrentMember))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Or&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;&lt;A href="http://www2.sas.com/proceedings/sugi31/219-31.pdf"&gt;http://www2.sas.com/proceedings/sugi31/219-31.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which had (top of page 9):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 10pt;"&gt;Aggregate([Time].[Months].CurrentMember.lag(1):[Time].[Months].CurrentMember.lag(12 ) ,[Measures].[Actual]) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.bi-notes.com/2011/12/sas-olap-cubes-tailing-time-based-data-dynamic-results/"&gt;http://www.bi-notes.com/2011/12/sas-olap-cubes-tailing-time-based-data-dynamic-results/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which had:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;Tail([Time].[YM].[MONTH].AllMembers ,13)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have I totally missed the point of what I've read in those above links?&amp;nbsp; This was a feature that could trivially be done in Cognos Powerplay Transformer, all that was required was a date variable, unfortunately I don't have that software.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 04:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Rolling-12-Months-Time-Dimensions/m-p/52988#M995</guid>
      <dc:creator>JohnT</dc:creator>
      <dc:date>2012-02-14T04:14:16Z</dc:date>
    </item>
    <item>
      <title>Rolling 12 Months Time Dimensions</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Rolling-12-Months-Time-Dimensions/m-p/52989#M996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; John, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where are you trying to add the MDX code? Please send me an example of the MDX you are trying to write. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 16:12:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Rolling-12-Months-Time-Dimensions/m-p/52989#M996</guid>
      <dc:creator>RMP</dc:creator>
      <dc:date>2012-02-14T16:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling 12 Months Time Dimensions</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Rolling-12-Months-Time-Dimensions/m-p/52990#M997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gday RMP,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried a couple of places.&amp;nbsp; Here's the one I was trying to describe in my original post:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SAS DI Studio &lt;/P&gt;&lt;P&gt;* navigate to the Cube &lt;/P&gt;&lt;P&gt;* right click on cube &lt;/P&gt;&lt;P&gt;* go to &lt;EM&gt;Maintain&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;* click on &lt;EM&gt;Calculated Members... &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;* click on &lt;EM&gt;Add &lt;/EM&gt;on the window that pops up &lt;/P&gt;&lt;P&gt;* select &lt;EM&gt;Custom &lt;/EM&gt;calculations and click on &lt;EM&gt;Next&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The area which I was attempting to put a variety of different pieces of code was in the &lt;EM&gt;Formula &lt;/EM&gt;box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a couple of lines of code I tried (after clearing the &lt;EM&gt;Format &lt;/EM&gt;field):&lt;/P&gt;&lt;P&gt;* &lt;SPAN style="font-family: courier new,courier;"&gt;aggregate(qtd(Sum(YTD(),[MEASURES].[]).CurrentMember))&amp;nbsp; &lt;/SPAN&gt;(with parent dimension left as MEASURES)&lt;/P&gt;&lt;P&gt;* &lt;SPAN style="font-family: courier new,courier;"&gt;aggregate(qtd(Sum(YTD(),[AccPeriod].[All AccPeriod]).CurrentMember)) &lt;/SPAN&gt;(with parent dimension left as MEASURES)&lt;/P&gt;&lt;P&gt;* &lt;SPAN style="font-family: courier new,courier;"&gt;aggregate(qtd(Sum(YTD(),[MEASURES].[]).CurrentMember)) &lt;/SPAN&gt;(with parent dimension left as [AccPeriod].[All AccPeriod])&lt;/P&gt;&lt;P&gt;* &lt;SPAN style="font-family: courier new,courier;"&gt;aggregate(qtd(Sum(YTD(),[AccPeriod].[All AccPeriod]).CurrentMember))&lt;/SPAN&gt; (with parent dimension left as [AccPeriod].[All AccPeriod])&lt;/P&gt;&lt;P&gt;* &lt;SPAN style="font-family: courier new,courier;"&gt;Aggregate([Time].[Months].CurrentMember.lag(1):[Time].[Months].CurrentMember.lag(12 ) ,[Measures].[Actual])&amp;nbsp; &lt;/SPAN&gt;(with parent dimension left as MEASURES)&lt;/P&gt;&lt;P&gt;* &lt;SPAN style="font-family: courier new,courier;"&gt;Aggregate([Time].[Months].CurrentMember.lag(1):[Time].[Months].CurrentMember.lag(12 ) ,[Measures].[Actual]) &lt;/SPAN&gt;(with parent dimension left as&amp;nbsp; [AccPeriod].[All AccPeriod])&lt;/P&gt;&lt;P&gt;* &lt;SPAN style="font-family: courier new,courier;"&gt;Tail([Time].[YM].[MONTH].AllMembers ,13) &lt;/SPAN&gt;(with parent dimension left as MEASURES)&lt;/P&gt;&lt;P&gt;* &lt;SPAN style="font-family: courier new,courier;"&gt;Tail([Time].[YM].[MONTH].AllMembers ,13) &lt;/SPAN&gt;(with parent dimension left as [AccPeriod].[All AccPeriod]) &lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure I've tried more weird and wonderful formulas that I no longer remember, and none of them worked.&amp;nbsp; AccPeriod is defined as a Time dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Feb 2012 22:45:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Rolling-12-Months-Time-Dimensions/m-p/52990#M997</guid>
      <dc:creator>JohnT</dc:creator>
      <dc:date>2012-02-14T22:45:11Z</dc:date>
    </item>
  </channel>
</rss>

