Skip to Content
Author's profile photo Ravin Angara

Enabling Hierarchies within SAP Business Objects Design Studio 1.6 Scorecard Component

In this blog I will showcase how you can embed a dimensional hierarchy within a scorecard.

There is a certain level of customization required to achieve this using the scorecard component options.

Very briefly, the steps involved in embedding the hierarchy within Scorecard component are:

  1. Define a datasource with a hierarchy. I will be using a hierarchy on country dimension.
  2. Create a cross-tab and scorecard based on the datasource.
  3. Define the row scope for the scorecard component.
  4. Customizing the scorecard columns and properties
  5. Configure node state, type and levels of hierarchy using scorecard cell content and layout options.
  6. Save and view the hierarchy using cross-tab and scorecard component.

Next, I will elaborate the steps mentioned above:

Defining the datasource with a hierarchy:

  1. Create a blank SAP Design Studio application.
  2. Assign a datasource and configure the initial view to have a hierarchy. In my scenario I am using

        a hierarchy on Country dimension, expanded to level 2.

fig_1.PNG

fig_2.PNG

Creating a Crosstab and assigning the same datasource to a Scorecard Component:

  1. Once you are done configuring the rows and columns, go ahead and press

       OK + Create CROSSTAB: fig_3.PNG

  2.   The crosstab is generated and the hierarchy data is represented as follows:

fig_4.PNG

3.  Now we start building and customizing our scorecard component. Drag and drop

      the scorecard component from the Analytic Component panel on the left.

fig_5.PNG

Defining the row scope

  1. Assign the datasource and define the row scope up to country dimension

       and press “Generate Initial Scorecard”.

fig_6.PNG

  2.   The generated scorecard looks like this:

fig_7.PNG

  3.   Let’s start customizing the scorecard columns.

Customizing the scorecard columns and properties

  1. Click on Column 1, and unbind the header text by clicking on the triangle

       below the Header text and choosing “Reset to Default”.

fig_8.PNG

  2.  Key in custom text and name the Header as “Country Hierarchy” and press enter.

       The header text in scorecard is updated accordingly.

fig_9.PNG

  3.   Next we will define additional columns. Place the selection on column 2 and press

        the “+” button. This will add a new column after Column_2.

fig_10.PNG

4. Once the column is added (COLUMN_3), set the following options:

    1. In the Header area, key-in a Header Text: “Node Type
    2. In the Cell Content, bind it to “Country” dimension and
    3. Assign the “Member Display” to “Member Type

fig_11.PNG

  5.  Next add another column after COLUMN_3 and set the following options:

    1. In the Header area, key-in a Header Text: “Node State
    2. In the Cell Content, bind it to “Country” dimension and
    3. Assign the “Member Display” to “Member Node State

fig_12.PNG

  6.  Now for the final column, COLUMN_5. Go ahead and add COLUMN_5,

       and set the following options:

    1. In the Header area, key-in a Header Text: “Node Level
    2. In the Cell Content, bind it to “Country” dimension and
    3. Assign the “Member Display” to “Member Level

fig_13.PNG

Now that we are done with setting the options on new columns, let’s get back to

setting and customizing our “Country HierarchyColumn.

Configuring Country Hierarchy column:

1.  Select COLUMN_1 (Country Hierarchy), and start by configuring the “Icon” property:

a.    Binding Type is dimension member content, which is straightforward.

       We are binding the country dimension.

b.    Member display requires a bit of configuring, as we will require to set it to

        “Member Node State” and set Conditional formatting. Please note this is

         essential as we will require to expand and collapse the hierarchy when we

         select a node in the Crosstab. We are assigning icons from SAP UI5 library

for “EXPANDED” node state and “COLLAPSED” node state. Therefore, the

configuration for setting

icon next to the Dimension Member Content text box. fig_15.PNG

To add additional conditions, use the 

conditional formatting ( invoked by pressing thefig_16.PNG+” icon.

     c. Now to finally view all the icons you have configured in the previous step, it is required to

         set the “Display Mode” to “Icon with text”.

fig_14.PNG

  2.  Next we configure the “Show Icon” property:

    1. Set the binding to “Country” Dimension.
    2. Set the “Member Display” to “Member Type”.
    3. Add conditional formatting by clicking on the icon adjacent to the Dimension

               Member Content text box. Add an additional condition and key-in “HIERARCHY_NODE”

               and set it to default selection by checking the checkbox. Uncheck the default value checkbox.

fig_18.PNG

    This setting will set the icon display to show HIERARCHY_NODE. Icon will show only for HIERARCHY

    NODES.

fig_17.PNG

  3.  Finally, we now switch to “Cell Layout” to configure the padding property.

       This is required to indent the different levels of hierarchy nodes display.

fig_19.PNG

Cell Padding will take care of the top, right, bottom and left margins for content alignment

  1. Data binding for country dimension needs to be defined.
  2. Member display needs to be set to “Member Level”, and we set a default value as

       Conditional Format to “10px 10px 10px {value}0px”. Please notice that we have a

       {value} in braces, which will be replaced by the value fetched by the “Member Level” i.e.

       if we have 3 levels in our hierarchy and we select level 2, then the {value} will be replaced

       by 2. As we have {value}0px, the result will be 20px. I hope that explanation helps.

fig_20.PNG

Save and view the hierarchy

  1. Save the application and launch it in local mode to test the hierarchy.
  2. You will notice that when you expand or collapse the hierarchy within the

       cross-tab, you will also see the hierarchy expand and collapse in the scorecard.

fig_21.PNG

This concludes the blog on embedding and configuring a Hierarchy within SAP Business Objects Design Studio 1.6

Scorecard Component.As this is the first release of the component, there is a possibility of additional refinements

in the future releases.

To remove the dependency on cross-tab to manage the hierarchy(expand and collapse) within scorecard, refer to this blog:

Dynamically expand and collapse hierarchies using scripting within Scorecard Component – SAP Business Objects Design Studio

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Mustafa Bensan
      Mustafa Bensan

      Hi Ravin,

      Thanks for sharing detailed steps for hierarchy configuration with the Scorecard component.  The documented approach seems to suggest that it is not possible to implement hierarchy functionality directly in the Scorecard component by allowing the expanding and collapsing of nodes when the '+'/'-' icons in the Scorecard hierarchy column are clicked but instead a "driver" component such as the Crosstab is required to indirectly allow the user to manipulate a hierarchy in the Scorecard component. 

      Can you confirm that my understanding is correct and that there is no out-of-the-box hierarchy functionality provided directly in the Scorecard component itself?

      Regards,

      Mustafa.

      Author's profile photo Ravin Angara
      Ravin Angara
      Blog Post Author

      Hi Mustafa,

      I am in the process of getting some clarity as I am sure you don't require a driver to get this working for scorecard. Let me get back to you.

      Regards,

      Ravin

      Author's profile photo Ravin Angara
      Ravin Angara
      Blog Post Author

      Hi Mustafa,

      Please check-out the following blog for enabling hierarchy collapse and expand functionality: Dynamically expand and collapse hierarchies using scripting within Scorecard Component - SAP Business Objects Design Studio

      I hope this meets your expectations.

      Best,

      Ravin

      Author's profile photo Mustafa Bensan
      Mustafa Bensan

      Thanks for the quick follow-up, Ravin.

      Regards,

      Mustafa.