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.

2-7-2016 12-41-47 PM

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

Multiple entries option is used when there is mutiple sets of filters are allowed on the attribute.

Is Mandatory

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.

Default Value:

We can Specify the variable at runtime with the default value by using constant or Expression.

2-7-2016 1-03-17 PM


Constant can be used when using fixed value. Ex: By selecting Value=US,

2-7-2016 3-01-18 PM


Expression can be used with functions and operators when there is complex scenerio.

2-7-2016 3-00-59 PM

Business Scenario:

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-7-2016 3-22-42 PM

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

2-7-2016 3-37-09 PM2-7-2016 3-35-40 PM

3) Now Created variables appeared in the Parameters/Variables tab as shown below.

2-7-2016 3-44-29 PM

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.

2-7-2016 3-49-04 PM

We can also change the default value from US to DE in the From column with the help of value dialog box.

2-7-2016 4-41-37 PM

5) Click on the Raw data format. The report is filtered by the country US.

2-7-2016 3-49-28 PM

Click on the Analysis Format. Drag and drop Attribute and Measures.

2-7-2016 4-33-56 PM

Post a Comment