Quantcast
Channel: williamweber.netwilliamweber.net » SQL Server
Viewing all articles
Browse latest Browse all 5

MDX: Scope Statement For All Measures in Multiple Measure Groups

$
0
0

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.


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images