When using a ranking function in Strategy Developer 9.x, null values are placed at the top of the dataset and are not given separate rank values.
Users may want to create a report which displays the metrics 'Unit Cost' and 'Unit Price', and a third metric, 'Rank' which ranks the items based on 'Unit Price' from high to low. Some of the items in the warehouse have null values for the two metrics. To do this, follow the steps below:
- Modify the Strategy Tutorial Warehouse to include null values (NOTE: It is recommended to backup the warehouse before making changes to it.):
- Navigate to the Tutorial Reporting Warehouse, typically C:\Program Files\MicroStrategy\Tutorial Reporting\TUTORIAL_DATA_7200.mdb
- Open the database to edit it.
- Open the 'LU_ITEM' table.
- Navigate to row 31, 'The Prince' and delete the two values for 'Unit Price' and 'Unit Cost'.
- Repeat step d for row 32, 'The Fountainhead'.
- Close the warehouse.
- Create a new metric called 'Rank' with the definition 'RunningCount()'.
- Right-click on the 'RunningCount' function and select 'Parameters'.
- Choose the 'Sort By' tab, and add the metrics 'Unit Price' descending, then 'Unit Cost' ascending, as shown below: