Use of Header on Axis
By Joyce Zhou - Updated May 28, 2015
Header has been introduced to give users more flexibility in defining axis within forms.
It allows users to add “dummy members” for display purpose. 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 axis definition.
Although both can add new rows/columns to a form, please notice adding headers and inserting row/column are very different.
Adding headers is a dynamic solution, i.e. position of the header is decided by its order in the axis definition list. Adding headers will change the query (i.e. contents in NATIVE MDX tab) of the form.
On the other side, whenever inserting a row/column in the form, the form will store this row/column with its row/column number. Therefore the row’s position is static however the form definition changes.
You can also define calculations on headers in a form. 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 below, we want to know the sum of Coupons and Discounts items.
Step 1. Add a header called “Coupons and Discounts”.
Step 2. Go to NATIVE MDX tab. We can find a WITH statement on the very top of the query. This is where we define the headers.
Step 3. Copy the highlighted part and paste it to the WITH tab. Define the calculation inside the single quotes after AS, as shown below.
Step 4. Go back to 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 Coupons and Discounts row now has data.