Sometimes it is useful to let the end-user determine the number of elements in a custom group at run-time. Using the Strategy Tutorial Project in Strategy Engine, a report is subject to the following requirements:
- Prompt on the beginning and ending date.
- Prompt on the number of days per band.
- The report should return a set of dates and the sales amount, grouped in sets of the numbers of days input on the first prompt.
To achieve this, the following seven objects are needed:
Object 1:
Web Analyst NAME:TYPE: Numeric value promptDEFINITION: This object is the prompt that will ask the end-user for the number of days on each group. | Web Analyst NAME:TYPE: Numeric value promptDEFINITION: This object is the prompt that will ask the end-user for the number of days on each group. |
Web Analyst NAME:TYPE: Numeric value promptDEFINITION: This object is the prompt that will ask the end-user for the number of days on each group. | NAME:TYPE: MetricDEFINITION: ApplySimple("#0", ?) This metric uses the prompt so it can be used in the calculations.NAME:TYPE: FilterDEFINITION:
|
Object 2:
NAME:TYPE: MetricDEFINITION: ApplySimple("#0", ?) This metric uses the prompt so it can be used in the calculations.NAME:TYPE: FilterDEFINITION:
| NAME:TYPE: MetricDEFINITION: ApplySimple("#0", ?) This metric uses the prompt so it can be used in the calculations.NAME:TYPE: FilterDEFINITION:
|
NAME:TYPE: MetricDEFINITION: ApplySimple("#0", ?) This metric uses the prompt so it can be used in the calculations.NAME:TYPE: FilterDEFINITION:
|
Object 3:
NAME:TYPE: MetricDEFINITION: ApplySimple("#0", ?) This metric uses the prompt so it can be used in the calculations.NAME:TYPE: FilterDEFINITION:
| NAME:TYPE: MetricDEFINITION: ApplySimple("#0", ?) This metric uses the prompt so it can be used in the calculations.NAME:TYPE: FilterDEFINITION:
|
This filter determines the date range. In this case, no prompt is used for simplicity. Prompts may be used in this filter without issue.NAME:TYPE: MetricDEFINITION: Sum() {~+} <> This metric will be the one shown on the report. Notice that this metric has the conditionality in it.NAME:TYPE: MetricDEFINITION: RunningCount(SALES) This metric will be used for grouping purposes.NAME:TYPE: MetricDEFINITION: ( / ) This metric will be used for grouping purposes.NAME:TYPE: Custom GroupDEFINITION: This custom group is a custom group banding qualification created on the metric, with band size banding type and a step size of '1' (integers). Under 'Level…' choose the attribute.
|
Object 4:
This filter determines the date range. In this case, no prompt is used for simplicity. Prompts may be used in this filter without issue.NAME:TYPE: MetricDEFINITION: Sum() {~+} <> This metric will be the one shown on the report. Notice that this metric has the conditionality in it.NAME:TYPE: MetricDEFINITION: RunningCount(SALES) This metric will be used for grouping purposes.NAME:TYPE: MetricDEFINITION: ( / ) This metric will be used for grouping purposes.NAME:TYPE: Custom GroupDEFINITION: This custom group is a custom group banding qualification created on the metric, with band size banding type and a step size of '1' (integers). Under 'Level…' choose the attribute.
| This filter determines the date range. In this case, no prompt is used for simplicity. Prompts may be used in this filter without issue.NAME:TYPE: MetricDEFINITION: Sum() {~+} <> This metric will be the one shown on the report. Notice that this metric has the conditionality in it.NAME:TYPE: MetricDEFINITION: RunningCount(SALES) This metric will be used for grouping purposes.NAME:TYPE: MetricDEFINITION: ( / ) This metric will be used for grouping purposes.NAME:TYPE: Custom GroupDEFINITION: This custom group is a custom group banding qualification created on the metric, with band size banding type and a step size of '1' (integers). Under 'Level…' choose the attribute.
|
This filter determines the date range. In this case, no prompt is used for simplicity. Prompts may be used in this filter without issue.NAME:TYPE: MetricDEFINITION: Sum() {~+} <> This metric will be the one shown on the report. Notice that this metric has the conditionality in it.NAME:TYPE: MetricDEFINITION: RunningCount(SALES) This metric will be used for grouping purposes.NAME:TYPE: MetricDEFINITION: ( / ) This metric will be used for grouping purposes.NAME:TYPE: Custom GroupDEFINITION: This custom group is a custom group banding qualification created on the metric, with band size banding type and a step size of '1' (integers). Under 'Level…' choose the attribute.
|
Object 5:
This filter determines the date range. In this case, no prompt is used for simplicity. Prompts may be used in this filter without issue.NAME:TYPE: MetricDEFINITION: Sum() {~+} <> This metric will be the one shown on the report. Notice that this metric has the conditionality in it.NAME:TYPE: MetricDEFINITION: RunningCount(SALES) This metric will be used for grouping purposes.NAME:TYPE: MetricDEFINITION: ( / ) This metric will be used for grouping purposes.NAME:TYPE: Custom GroupDEFINITION: This custom group is a custom group banding qualification created on the metric, with band size banding type and a step size of '1' (integers). Under 'Level…' choose the attribute.
| This filter determines the date range. In this case, no prompt is used for simplicity. Prompts may be used in this filter without issue.NAME:TYPE: MetricDEFINITION: Sum() {~+} <> This metric will be the one shown on the report. Notice that this metric has the conditionality in it.NAME:TYPE: MetricDEFINITION: RunningCount(SALES) This metric will be used for grouping purposes.NAME:TYPE: MetricDEFINITION: ( / ) This metric will be used for grouping purposes.NAME:TYPE: Custom GroupDEFINITION: This custom group is a custom group banding qualification created on the metric, with band size banding type and a step size of '1' (integers). Under 'Level…' choose the attribute.
|
This filter determines the date range. In this case, no prompt is used for simplicity. Prompts may be used in this filter without issue.NAME:TYPE: MetricDEFINITION: Sum() {~+} <> This metric will be the one shown on the report. Notice that this metric has the conditionality in it.NAME:TYPE: MetricDEFINITION: RunningCount(SALES) This metric will be used for grouping purposes.NAME:TYPE: MetricDEFINITION: ( / ) This metric will be used for grouping purposes.NAME:TYPE: Custom GroupDEFINITION: This custom group is a custom group banding qualification created on the metric, with band size banding type and a step size of '1' (integers). Under 'Level…' choose the attribute.
|
Object 6:
This filter determines the date range. In this case, no prompt is used for simplicity. Prompts may be used in this filter without issue.NAME:TYPE: MetricDEFINITION: Sum() {~+} <> This metric will be the one shown on the report. Notice that this metric has the conditionality in it.NAME:TYPE: MetricDEFINITION: RunningCount(SALES) This metric will be used for grouping purposes.NAME:TYPE: MetricDEFINITION: ( / ) This metric will be used for grouping purposes.NAME:TYPE: Custom GroupDEFINITION: This custom group is a custom group banding qualification created on the metric, with band size banding type and a step size of '1' (integers). Under 'Level…' choose the attribute.
| This filter determines the date range. In this case, no prompt is used for simplicity. Prompts may be used in this filter without issue.NAME:TYPE: MetricDEFINITION: Sum() {~+} <> This metric will be the one shown on the report. Notice that this metric has the conditionality in it.NAME:TYPE: MetricDEFINITION: RunningCount(SALES) This metric will be used for grouping purposes.NAME:TYPE: MetricDEFINITION: ( / ) This metric will be used for grouping purposes.NAME:TYPE: Custom GroupDEFINITION: This custom group is a custom group banding qualification created on the metric, with band size banding type and a step size of '1' (integers). Under 'Level…' choose the attribute.
|
This filter determines the date range. In this case, no prompt is used for simplicity. Prompts may be used in this filter without issue.NAME:TYPE: MetricDEFINITION: Sum() {~+} <> This metric will be the one shown on the report. Notice that this metric has the conditionality in it.NAME:TYPE: MetricDEFINITION: RunningCount(SALES) This metric will be used for grouping purposes.NAME:TYPE: MetricDEFINITION: ( / ) This metric will be used for grouping purposes.NAME:TYPE: Custom GroupDEFINITION: This custom group is a custom group banding qualification created on the metric, with band size banding type and a step size of '1' (integers). Under 'Level…' choose the attribute.
|
To understand the approach, consider a report with the following elements:
- The attribute
- The four metrics above
- '8' as an answer to the prompt
The report returns the following data: