williamweber.net
  • Home
  • About
KEEP IN TOUCH

Posts tagged Analysis Services

MDX: Scope Statement For All Measures in Multiple Measure Groups

Dec06
2011
Leave a Comment Written by Will

This was irritating me today so I thought I would share. If you need to write a scope statement that will include all the measures in multiple measure groups; perhaps you’re implementing some Time Intelligence calculations and you want to have any new measures dynamically included, then the statement looks a little something like this:

SCOPE({MeasureGroupMeasures("Internet Sales"), MeasureGroupMeasures("Reseller Sales")});

I forgot the {} the first time around and was super confused by an error message when I attempted to deploy the MDX calculation to the cube that said that said “The END SCOPE statement does not match the opening SCOPE statement.” Because my SCOPE and END SCOPE statements looked just fine to me.

  • Share this:
Posted in BI, Scripts - Tagged MDX, Scripts, SSAS

Recent Posts

  • Named Set Sub-totals in Excel using VisualTotals()
  • New Camera Please. – Mirrorless ILC Goodness
  • Formatting Map Legends in SQL Server 2008 R2 Reporting Services
  • MDX: Scope Statement For All Measures in Multiple Measure Groups
  • Startup Frenzy Is Out of Control

From Twitter:

  • Not being able to put named sets in the report filter of an Excel pivot table really is becoming the bane of my existence lately. #msbi 7 hrs ago
  • In @Target and there isn't a @windowsphone in sight. Are they even trying. 3 days ago
  • Troubleshooting data driven subscriptions in #SSRS is good fun. 5 days ago
  • More updates...

Posting tweet...

Powered by Twitter Tools

Categories

  • BI
  • Gaming
  • Opinion
  • Photography
  • Reporting
  • Scripts
  • Social Games
  • SQL Server
  • XNA

Archives

  • February 2012
  • January 2012
  • December 2011
  • October 2011
  • September 2011
  • April 2011
  • January 2011
  • December 2009
  • July 2009
  • April 2009

EvoLve theme by Theme4Press  •  Powered by WordPress williamweber.net