Variables are used to filter the content of an information model. Variables can also be used to filter attributes.
Ex: By filtering the result to Specific Country or Year.
We can create Variables in Analytic and calculation views.
The following types of Supported Variables in selection type are:
|Single Value||filter data on a single value of the column|
|Range||to use operators such as Equal to , Greater than.|
|Interval||to specify an interval between two values of the column|
Multiple entries option is used when there is mutiple sets of filters are allowed on the attribute.
We can define whether the variable at runtime is mandatory. If it is not mandatory, at the execution time the user can execute the data without filtering.
We can Specify the variable at runtime with the default value by using constant or Expression.
Constant can be used when using fixed value. Ex: By selecting Value=US,
Expression can be used with functions and operators when there is complex scenerio.
The COPA Actual data report has to be filtered for a specific country.
Step By step Process on Creating Variables in HANA.
1) Goto to Semantics in the scenerio pane of Analytic or Calculation view. Choose the Parameters /Varaiables tab. Click on the + Sign and Choose Create variable.
2) Give the Name and Label for the variable. In the attribute view select the required attribute.
In this example: Attribute : LAND1 which is the country field is selected.
Default Value: Constant : US is selected.
Click on OK.
* We can also enter additional Attributes in the Apply the variable filter to option by clicking ADD
3) Now Created variables appeared in the Parameters/Variables tab as shown below.
4) Save/Validate the object and Activate the Analytic View. Then Click the data preview, the Variables and Input Parameters window will pop-up.
Since the default value is specified as US in constant it shows US. Press Ok button.
5) Click on the Raw data format. The report is filtered by the country US.
Click on the Analysis Format. Drag and drop Attribute and Measures.