locked
Can we sum avg values in ssas RRS feed

  • Question

  • Hi all

    we are having values from Jan2011 to dec 2011..for 2011 we are taking the avg of all the months to get 2011 total.. Similarly for other years as well..However we are not getting an aggregate of all the year totals..

     

    Any solution??

     

    Regards

    Bharath

     

    Tuesday, July 19, 2011 12:05 PM

Answers

  • Try this

    SCOPE(<<Date Hierarchy>>.[All], <<Measure Name>>);
    This = SUM(<<Date Hierarchy>>.[All].Children, <<Measure Name>>);
    END SCOPE;

     

    HTH


    -Remember to mark as helpful/the answer if you agree with the post.
    • Edited by Naveen Das Tuesday, July 19, 2011 3:51 PM
    • Marked as answer by Challen Fu Wednesday, July 27, 2011 7:43 AM
    Tuesday, July 19, 2011 3:44 PM
  • That should probably read:

    SCOPE(<<Date Hierarchy>>.[All], <<Measure Name>>);
    This = SUM(<<Date Hierarchy>>.[All].Children, <<Measure Name>>);
    END SCOPE;
    

    Note the ".Children".

     


    http://bi-logger.blogspot.com/
    • Marked as answer by Challen Fu Wednesday, July 27, 2011 7:43 AM
    Tuesday, July 19, 2011 3:49 PM

All replies

  • Why do you wish to get the sum of averages. That is a meaningless number.

    Still, if you really do want to do this, then you can use the SCOPE statement defined at the All level of the relevant dimension and for the given measure and set the new value to be the sum of the children of that dimension's All level.

     


    http://bi-logger.blogspot.com/
    Tuesday, July 19, 2011 3:29 PM
  • Try this

    SCOPE(<<Date Hierarchy>>.[All], <<Measure Name>>);
    This = SUM(<<Date Hierarchy>>.[All].Children, <<Measure Name>>);
    END SCOPE;

     

    HTH


    -Remember to mark as helpful/the answer if you agree with the post.
    • Edited by Naveen Das Tuesday, July 19, 2011 3:51 PM
    • Marked as answer by Challen Fu Wednesday, July 27, 2011 7:43 AM
    Tuesday, July 19, 2011 3:44 PM
  • That should probably read:

    SCOPE(<<Date Hierarchy>>.[All], <<Measure Name>>);
    This = SUM(<<Date Hierarchy>>.[All].Children, <<Measure Name>>);
    END SCOPE;
    

    Note the ".Children".

     


    http://bi-logger.blogspot.com/
    • Marked as answer by Challen Fu Wednesday, July 27, 2011 7:43 AM
    Tuesday, July 19, 2011 3:49 PM
  • good catch - thanks Philip
    -Remember to mark as helpful/the answer if you agree with the post.
    Tuesday, July 19, 2011 3:51 PM