March 13, 2016 at 4:01 pm
Ive been trying for the last few hours to create a SIMPLE scope statement in SSAS, but whatever I do I get an error with a red squigly underline on the SCOPE statement and the 'syntax for scope is incorrect' error.
As soon as I type the word scope SSAS throws it out with a red squiggly line, ive attached an image as an example. Other threads mention this problem but suggest the use of semi-colons to clear it up, it has no effect here.
Does anyone have any ideas? Thankyou in advance.
March 14, 2016 at 1:35 pm
Your syntax for the scoped assignment is incorrect.
A scoped assignment sets the value of a calculated measure(s), but in itself is not a calculated measure. This means that you cannot start the scoped assignment with "CREATE MEMBER...".
Create an empty calculated measure first ("CREATE MEMBER... AS NULL;") followed by the scoped assignment ("SCOPE (<calculated measure created in the first step>)...")
March 15, 2016 at 10:06 am
Martin,
Thanks for the reply. Ive had another try and im still getting a red line under the word scope no matter what I do. Ive included another screenshot, am I way off the mark? Thanks.
March 16, 2016 at 8:12 am
The reason for the red line is because your Scope statement is incomplete. It should go away once you've added the rest of it.
March 16, 2016 at 3:32 pm
Martin,
That worked, thanks.
Still don't know why theres a red squiggly line underneath Scope but oh well.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply