Filters and Restricted Key Figures

Team-Fly

Filters and restricted key figures are two common methods for limiting the scope of the result set. Filters can be fixed or a range of values that are passed on to select a data set for the query.

The restricted key figures are virtual key figures in the Query definition that are derived based on the InfoCube Key.

For example, suppose you want to display only the sales revenues for the current and previous years in your report. To do so, create two restricted key figures: Current Year and Previous Year. Use these restricted key figures in your query, as shown in Figure 11-12, instead of the Amount key figure, as shown in Figure 11-9.

Follow these steps to define restricted key figures:

  1. Create a new query or, in this case, open a query defined earlier in this chapter and edit. Figure 11-5 shows the characteristics and selected key figures for this query.

  2. Right-click the folder labeled Key figure, on the top left in the query edit screen, and select the New restricted key figure option.

  3. Right-click Calendar year in the key figure definition area and select Restrict.

  4. As shown in Figure 11-10, a new dialog box appears to define new key figures. Because sales revenues need to be restricted to the previous year (that is, 1998), drag and drop the key figure Amount in the restricted key figure definition area.

    click to expand
    Figure 11-10: Creating Restricted Key Figures in the BEX Analyzer Query.

    Also drag characteristic Calendar year from Time Dimensions in the Key figure definition area, as shown in Figure 11-10. Here you either list all available calendar years in the SAP BW instance or enter a year. In this case, enter 1998 to restrict Amount values for the year 1998. Instead of restricting Amount values to one fixed number, you can select a range of values or a hierarchy node to restrict the scope of data. Give a descriptive name to this field.

  5. Save this definition and click the icon to exit.

  6. The query definition shows two restricted key figures defined in the query Key figures folder. Simply drag and drop these two new restricted key figures in the Columns definition area to display the results, as shown in Figure 11-11.

    click to expand
    Figure 11-11: Using Restricted Key Figures in the BEX Analyzer Query.

  7. Save the query definition and click the icon to go back in Microsoft Excel. The BEX Analyzer refreshes data and displays the results, as shown in Figure 11-12. Note here that by using restricted keys, you can present data very effectively as compared to the straight drill-down method, as shown in Figure 11-12.

    click to expand
    Figure 11-12: Displaying Current and Past Year Revenues by using Restricted Key Figures.


Team-Fly


Business Information Warehouse for SAP
Business Information Warehouse for SAP (Prima Techs SAP Book Series)
ISBN: 0761523359
EAN: 2147483647
Year: 1999
Pages: 174
Authors: Naeem Hashmi

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net