<?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: Aggregate Functions in Information Map in SAS Web Report Studio</title>
    <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58064#M1114</link>
    <description>You would use the MDX lag function for this.&lt;BR /&gt;
&lt;BR /&gt;
Something like:&lt;BR /&gt;
&lt;BR /&gt;
 Sum (&lt;BR /&gt;
         ([Date].CurrentMember.Lag(11):[Date].CurrentMember),&lt;BR /&gt;
         [Measures].[Revenue] &lt;BR /&gt;
        )&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
~ Angela&lt;BR /&gt;
&lt;A href="http://sas-bi.blogspot.com" target="_blank"&gt;http://sas-bi.blogspot.com&lt;/A&gt;</description>
    <pubDate>Tue, 04 Jan 2011 18:38:50 GMT</pubDate>
    <dc:creator>AngelaHall</dc:creator>
    <dc:date>2011-01-04T18:38:50Z</dc:date>
    <item>
      <title>Aggregate Functions in Information Map</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58063#M1113</link>
      <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
I need generate an operational report which will look like the following:&lt;BR /&gt;
&lt;BR /&gt;
date ;      Sales Person ;  Today's Revenue ;   sum of  Last 7 Days Revenue.&lt;BR /&gt;
&lt;BR /&gt;
The source data table will provide data for date, sales person and today's revenue.  Sum of last 7 days revenue need to be calculated for each sales person each day.&lt;BR /&gt;
&lt;BR /&gt;
Since this is a very simple report and I was trying not to use an OLAP cube.  I wanted to use Information Map and create a data item to calculate the last 7 days' revenue.   Since I am not using a cube, I can not use MDX function such as LastPreriods() (am I right on this?).  Is there a function or work around to create a data item for this kind of calculation?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Bob.&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: databobjr

Message was edited by: databobjr</description>
      <pubDate>Tue, 04 Jan 2011 18:06:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58063#M1113</guid>
      <dc:creator>databobjr</dc:creator>
      <dc:date>2011-01-04T18:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Functions in Information Map</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58064#M1114</link>
      <description>You would use the MDX lag function for this.&lt;BR /&gt;
&lt;BR /&gt;
Something like:&lt;BR /&gt;
&lt;BR /&gt;
 Sum (&lt;BR /&gt;
         ([Date].CurrentMember.Lag(11):[Date].CurrentMember),&lt;BR /&gt;
         [Measures].[Revenue] &lt;BR /&gt;
        )&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
~ Angela&lt;BR /&gt;
&lt;A href="http://sas-bi.blogspot.com" target="_blank"&gt;http://sas-bi.blogspot.com&lt;/A&gt;</description>
      <pubDate>Tue, 04 Jan 2011 18:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58064#M1114</guid>
      <dc:creator>AngelaHall</dc:creator>
      <dc:date>2011-01-04T18:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Functions in Information Map</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58065#M1115</link>
      <description>Thanks Angela. &lt;BR /&gt;
&lt;BR /&gt;
But I am not using a cube, therefore, there is no  time dimension (date). right?&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Bob.</description>
      <pubDate>Tue, 04 Jan 2011 19:32:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58065#M1115</guid>
      <dc:creator>databobjr</dc:creator>
      <dc:date>2011-01-04T19:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Functions in Information Map</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58066#M1116</link>
      <description>Sorry your first post was confusing.&lt;BR /&gt;
There is a lag function in SAS as well but it is only available in data step. Information Maps use SQL and when attempting a SQL lag function, I get a message stating that its only available in the data step.&lt;BR /&gt;
&lt;BR /&gt;
So your other options:&lt;BR /&gt;
1. create the running total using data step lag function during data building time&lt;BR /&gt;
2. utilize a stored process with your information map that computes the running total (using the data step lag function)&lt;BR /&gt;
3. moving to an olap cube&lt;BR /&gt;
&lt;BR /&gt;
~ Angela&lt;BR /&gt;
&lt;A href="http://sas-bi.blogspot.com" target="_blank"&gt;http://sas-bi.blogspot.com&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;U&gt;Reference&lt;/U&gt;&lt;BR /&gt;
SAS Documentation on LAG Function:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000212547.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#a000212547.htm&lt;/A&gt;</description>
      <pubDate>Tue, 04 Jan 2011 20:24:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58066#M1116</guid>
      <dc:creator>AngelaHall</dc:creator>
      <dc:date>2011-01-04T20:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Functions in Information Map</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58067#M1117</link>
      <description>Thanks Angela.&lt;BR /&gt;
&lt;BR /&gt;
I created a cube and it worked with the mdx function.  However, I need to produce a summary reports which the user can select a date from the filter, and the report shows something like:&lt;BR /&gt;
&lt;BR /&gt;
date select 12/20/2010&lt;BR /&gt;
&lt;BR /&gt;
sale person,  last 7 day Revenue, last 15 days revenue,  last 30 days revenue&lt;BR /&gt;
&lt;BR /&gt;
If I did not include the time dimension on the reports, the MDX did not work.  I used web report studio.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Bob.</description>
      <pubDate>Thu, 06 Jan 2011 12:17:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58067#M1117</guid>
      <dc:creator>databobjr</dc:creator>
      <dc:date>2011-01-06T12:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregate Functions in Information Map</title>
      <link>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58068#M1118</link>
      <description>The Time Dimension needs to be included in the MDX query for the calculated measure to be generated. In Web Report Studio, the query is generated automatically by what is used/included in the report. Therefore what you are seeing is expected.&lt;BR /&gt;
&lt;BR /&gt;
If you would prefer to not include the dimension in the result, an alternative is to utilize a SAS Stored Process within your information map that queries the OLAP cube and generates the data result for Web Report Studio to then display.&lt;BR /&gt;
Bypassing the Information Map query is discussed in a webinar I presented last month. &lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/onlinedoc/guide/webreportstudioperformancewebinar.htm" target="_blank"&gt;http://support.sas.com/documentation/onlinedoc/guide/webreportstudioperformancewebinar.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
~ Angela &lt;BR /&gt;
&lt;A href="http://sas-bi.blogspot.com" target="_blank"&gt;http://sas-bi.blogspot.com&lt;/A&gt;</description>
      <pubDate>Thu, 06 Jan 2011 14:26:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Web-Report-Studio/Aggregate-Functions-in-Information-Map/m-p/58068#M1118</guid>
      <dc:creator>AngelaHall</dc:creator>
      <dc:date>2011-01-06T14:26:38Z</dc:date>
    </item>
  </channel>
</rss>

