EnterpriseDW_SSAS
 MdxScript (Commands Index)
  Command Text
Calculations Command Script
                  /*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is affected.
You should edit this command only if you manually specify how the cube is aggregated.
*/
                  CALCULATE;
                  CREATE MEMBER CURRENTCUBE.[Measures].[GLBudgetToPeriodAmount]
                  AS (
                  Aggregate
                  (
                  PeriodsToDate
                  (
                  [Date].[FiscalCalendar].[Fiscal Year]
                  ,[Date].[FiscalCalendar].currentmember
                  )
                  ,[Measures].[GL Budget Amount]
                  )
                  ),
                  FORMAT_STRING = "#,##0.00;-#,##0.00",
                  VISIBLE = 1 ,  DISPLAY_FOLDER = 'Calcs' ,  ASSOCIATED_MEASURE_GROUP = 'Fact Gl Transactions';
                  CREATE MEMBER CURRENTCUBE.[Measures].[PositionBudgetToPeriodAmount]
                  AS (
                  Aggregate
                  (
                  PeriodsToDate
                  (
                  [Date].[FiscalCalendar].[Fiscal Year]
                  ,[Date].[FiscalCalendar].currentmember
                  )
                  ,[Measures].[Budget Amount]
                  )
                  ),
                  FORMAT_STRING = "#,##0.00;-#,##0.00",
                  VISIBLE = 1 ,  DISPLAY_FOLDER = 'Calcs' ,  ASSOCIATED_MEASURE_GROUP = 'Fact Position Budget';
                  CREATE MEMBER CURRENTCUBE.[Measures].[GLActualsToPeriodAmount]
                  AS (
                  Aggregate
                  (
                  PeriodsToDate
                  (
                  [Date].[FiscalCalendar].[Fiscal Year]
                  ,[Date].[FiscalCalendar].currentmember
                  )
                  ,[Measures].[Actuals Amount]
                  )
                  ),
                  FORMAT_STRING = "#,##0.00;-#,##0.00",
                  VISIBLE = 1 ,  DISPLAY_FOLDER = 'Calcs' ,  ASSOCIATED_MEASURE_GROUP = 'Fact Gl Transactions';
                  CREATE MEMBER CURRENTCUBE.[Measures].[ExpenseToPeriodAmount]
                  AS (
                  Aggregate
                  (
                  PeriodsToDate
                  (
                  [Date].[FiscalCalendar].[Fiscal Year]
                  ,[Date].[FiscalCalendar].currentmember
                  )
                  ,[Measures].[Expense Amount]
                  )
                  ),
                  FORMAT_STRING = "#,##0.00;-#,##0.00",
                  VISIBLE = 1 ,  DISPLAY_FOLDER = 'Calcs' ,  ASSOCIATED_MEASURE_GROUP = 'Fact Position Expense';
                  CREATE MEMBER CURRENTCUBE.[Measures].[ExpenseToPriorYearPeriodAmount]
                  AS (
                  Aggregate
                  (
                  PeriodsToDate
                  (
                  [Date].[FiscalCalendar].[Fiscal Year]
                  ,[Date].[FiscalCalendar].currentmember.LAG(12)
                  )
                  ,[Measures].[Expense Amount]
                  )
                  ),
                  FORMAT_STRING = "#,##0.00;-#,##0.00",
                  VISIBLE = 1 ,  DISPLAY_FOLDER = 'Calcs' ,  ASSOCIATED_MEASURE_GROUP = 'Fact Position Expense'  ;
                
Powered by BI Documenter