Author: Joyce Zhou
Introduction
Headers give users more flexibility in defining axes within Forms. In the example below, the rows: Interest and Tax Rate, Net Income Allocation Ratio, and OPEX Payable Ratio are all Form Headers that were defined in the ROW tab.
Example
Headers allows users to add “dummy members” for display purposes. You can add empty Headers or give the Header a display name, however the name has to be different from real Dimension Members to avoid conflict. Headers will be displayed as H(HeaderName) in the axis definition.
Although both can add new rows/columns to a Form, please note that adding Headers and inserting rows/columns are very different.
- Adding Headers is a dynamic solution, i.e., the position of the Header is decided by its order in the axis definition list. Adding Headers will change the query (i.e., the contents in the NATIVE MDX tab) of the form.
- Inserting a row/column in the Form causes the Form to store the row/column with its row/column number. Therefore the row’s position is static, even if the Form definition changes.
Advanced Usage
You can also define calculations in Headers. The calculation will be processed when the Form is rendered. That is to say, the calculated value is Form-based and it does not exist in the cube.
For example, in the Form above, let's say we want to add together the Interest % and Taxes % rows.
Step 1. Go to the NATIVE MDX tab. We can find a WITH statement on the very top of the query. This statement is generated automatically and is where we define the Headers.
Step 2. Copy the highlighted part and paste it in the WITH tab. Define the calculation inside the single quotes after AS, as shown below.
Step 3. Go back to the CURRENT tab and check With. You’ll find the WITH part in the query has been replaced with what we have defined in WITH tab.
Going back to the Form you’ll find the Interest and Tax Rate row now has data.
Comments
0 comments
Please sign in to leave a comment.