Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

SCOPE errors out in Calculations. Parser: The syntax for ';' is incorrect.

$
0
0

SSAS does not like this scope statement, First SCOPE gets underlined and if I try to process I'd get MdxScript(cubeInventory)(30,11) Parser: The syntax for ';' is incorrect. please help!

-----------------------------------------------------------------------------------------

// the most recent day with data
CREATE HIDDEN SET [Yesterday]
AS Exists([Date].[Calendar].[Date].Members, [Date].[Yesterday Flag].&[True]);

// The Inventory measures are AggregateFunction=LastChild.
// When we are in a current period, use the most recent day to
// get the inventory counts.
SCOPE(MeasureGroupMeasures("Item Inventory"));

  SCOPE(Exists([Date].[Calendar].[Month].Members, [Date].[Yesterday Flag].&[True]));
    this = [Yesterday].Item(0).Item(0);
  END SCOPE;
 
  SCOPE(Exists([Date].[Calendar].[Quarter].Members, [Date].[Yesterday Flag].&[True]));
    this = [Yesterday].Item(0).Item(0);
  END SCOPE;
 
  SCOPE(Exists([Date].[Calendar].[Year].Members, [Date].[Yesterday Flag].&[True]));
    this = [Yesterday].Item(0).Item(0);
  END SCOPE;
 
  [Date].[Calendar].[All] = [Yesterday].Item(0).Item(0);
 
END SCOPE;


Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>