Examples of measure item captions that use different combinations of variables and static text are shown below. Examples are shown for all types of measure items -- regular with time ranges, regular without time ranges, and calculated. Captions can include a combination of the following elements or just one of these elements, whatever your preference:
Variables that specify the type of data to return such as the name of the underlying measure, the long description of the From and To periods for time ranges, or the name and description of conditional formats applied to the measure items. For captions of calculated measure items, you also can include variables such as the captions of measure items that make up the calculated measure item’s expression. Stratum.Viewer evaluates the variables when you run a view and pulls in the proper data from the most current data in Analysis Services database on which the view was built.
Static text that remains the same each time the view is executed.
Line breaks that place different parts of the caption on separate lines. If you don't use line breaks, only text wrapping will control the caption display. Line wrapping updates automatically as the size of the grid area or browser changes.
More: Click here for a complete list of all example MDX expressions that exist in this online help for all types of Stratum.Viewer items (calculated measure items, measure item captions, filters, and more).
Here are the properties for a measure item with a time range. The measure item is based on the Daily Sales Daily Sales Amount measure from the Daily Sales category.
Here are some examples of caption expressions that were set up for the measure item and what each executed caption looked like in the view. In these examples, the current year is 2014 and the current month is September. The time elements in the evaluated captions reflect that current state of the data. Variables are the parts of the expressions that have brackets [ ] around them.
Builds Caption with... |
Example Expression & Caption |
Variables for measure, short description of periods, and short format for year (separated by spaces and static text) |
Expression [Measure] [From Period Short Desc] [From Year YY] to [To Period Short Desc] [To Year YY] Caption in View |
Variables for measure, long description of periods, and long format for years (separated by spaces and static text) |
Expression [Measure] [From Period Long Desc] [From Year YYYY] to [To Period Long Desc] [To Year YYYY] Caption in View |
Variable for category and measures (separated by spaces and static text) |
Expression [Category] - YTD [Measure] Caption in View |
Static text, line breaks, and variable for measure |
Expression Current YTD Caption in View |
Here are the properties for a measure item without time ranges. This measure item also is based on the Daily Sales Daily Sales Amount measure from the Daily Sales category.
Next are some examples of caption expressions that were set up for the measure item and what each executed caption looked like in the view. Variables are the parts of the expressions that have brackets [ ] around them.
Builds Caption with... |
Example Expression & Caption |
Variable for measure |
Expression [Measure] Caption in View |
Variable for category and static text |
Expression [Category] Amount $ Caption in View |
Variable for category, line break, and static text |
Expression [Category] Caption in View |
Here is an expression for a calculated measure item that uses two other measure items in a view to perform its calculation. In the examples that follow, caption variables from a sales amount and budget amount measure item in the view will be used to generate the caption for the calculated measure item.
Here is the view before the caption for the calculated measure item is customized. The caption is currently the default, which is the name of the calculated measure item – in this case Data3.
Next are two examples of caption expressions that were set up for the measure item and what each evaluated caption looked like in the view. Both examples that follow include static text and the captions of the sales amount and budget amount measure items that comprise the calculation. The caption for the calculated measure item will reflect the current period details from the sale amount and budget amount measure items. That caption will automatically adjust as the time period and data used in the calculation changes. The first example does not use line breaks in the caption expression. The second example includes line breaks.
Builds Caption with... |
Example Expression & Caption |
Static text, ‘Caption’ variables from two other measure items, without line break |
Expression Caption in View |
Static text, ‘Caption’ variables from two other measure items, with line breaks |
Expression Caption in View |
Next is the same calculated measure item with a conditional format applied to it. The conditional format is named Track Below 10 million and it displays a yellow arrow when the variance is below $10,000,000. The next example shows the grid after the caption expression was edited to include the Conditional Format Name variable in the expression.
Builds Caption with... |
Example Expression & Caption |
Variable for conditional format name |
Expression Caption in View |