Scorecard: Step by Step for Use of Attributes
For those who are on BW as data source you probably have also attributes (display attributes) in your queries and dimensions. Those attributes can be accessed in scorecard to define the columns and properties.
How to Start?
First, we will attach a data source and activate the attributes:
In my query, I can find attributes on more dimensions, eg. 0D_PH2 and Calendar Year/Month
Using the initial view editor, I can mark the attributes I want to see in my drill down.
The effect is, right to the dimension member the attribute is visible. Those are visible also directly in crosstab component.
Placing Attributes in Scorecard
In Scorecard, attributes are not visible in the beginning. You can nevertheless select them in column definition.
Using this data source we will get such scorecard generated:
Now, we will start adding attributes for Calendar Year/Month, the “Number of Workdays”. First, we add a column (copy the Calendar Year/Month column – this is the easiest way).
Setting Up Attribite as Display
Then, we change the description and also the content definition. This is the main point.
and now the attributes are visible:
What you can make more with Attributes?
You can consider attributes as a “normal” input method, therefore all conditional display setting will work exactly same as in the example with Scorecard: Step by Step to Custom Color in Charts (pick visually one value) and Scorecard: Step by Step to Nice Visualization (Conditional Format).
So, I can easily select the other attribute – number of days in a month for formatting. Those are giving 28,29,30 and 31 as input.
Definition for column 1, background:
and the effect is:
As usual in this case, you are restricted to 9 different conditional displays – which should be ok for picking up some special attributes and visualizing them.
Important to Know
I forgot to mention, that the attributes will be addressed in the definition of scorecard columns by index
This means, be careful when changing the attributes in result set. Once you add new attribute it will be placed at the end of the attributes. The problem will occur when you remove some attribute and the index will change. Doing that, you have to go again into the column definition, then the new index will be recalculated again. There are more context information saved (like attribute name), so the index can be recalculated as long the attribute is available.
The resultset after my change (I have removed all and inserted in different sequence)
I have exported the data source to CSV and the example is available here.
You can find in it 2 Scorecards and 2 data sources. The first one will not work offline, the second is an CSV and will display data including the attributes.
Thanks for a very interesting post. On a similar note, would you be able to advise if there is a way in DS to retrieve an attribute for a given dimension member?
Taking your example, I would like to read the Number of Days attribute (28) for, say, Stereo Kit. Is it possible? Or is a scorecard component the only way to see attributes?