Level(Level: DimCalendarLevel): Boolean;
Level. Calendar level that can be used in the variable frequency.
The Level property determines whether the calendar level that is passed by the Level parameter is presented in variable frequency.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Variable: IMsVariable;
Sampling: IMsVariableSampling;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemByIdNamespace("Var_1", MB.ItemById("KONT_MODEL").Key).Edit;
Variable := MObj As IMsVariable;
Sampling := Variable.Sampling;
Sampling.Level(DimCalendarLevel.Year) := True;
Sampling.Level(DimCalendarLevel.HalfYear) := True;
MObj.Save;
End Sub Main;
After executing the example, as the calculation step for modeling variable with the Var_1 identifier, the Years and Half-years are used.
See also: