Business Objects Training

april 2008 e-newsletter

using the rank() function
Using Web Intelligence XI R2 (public training offered May 5th) you can easily rank data in a table by using the Rank() function.  For example, you have a report listing your salespeople and their commission and you want to rank the report by commission amount.  How do you do that?  It’s easy – just follow the steps below:

You have created the following report:

Commision Ranking

In order to rank our employees by their commission, we need to create a variable using the Rank function and then add it to the report and apply a sort:

  1. To create the new variable, click the Variable Editor button in the Reporting Toolbar.

    The Variable Editor will be displayed.
  2. Name the variable Commission Ranking.
  3. Set the Qualification to Measure.
  4. Click on the Functions tab to list the available functions.
  5. The Rank function is in the Numeric folder.  It is also listed in the All folder.  Double-click the Rank function to add it to the Formula box.

    The Rank function ranks a measure based on a dimension.  In our report, we will rank our names by the commission amount.  The syntax for the Rank function is:


    NOTE:  There are additional optional parameters that can be used with the Rank function.  These parameters will be covered in a future tip.

  6. Put the cursor in the parenthesis in the formula box.
  7. Click the Data tab to display the available objects that can be used in this variable.
  8. Double-click the Commission measure object.
  9. The parameters are separated by a semi-colon (;).  Type in a semi-colon after the Commission object.
  10. Double-click the Name object.  The formula should look like:

    =Rank([Commission];[ Name])

  11. Click the checkmark button to validate the syntax.  If you do not get any errors, click OK.
  12. The new variable is listed in the Data tab of the Report Manager.
    Data Tab in the Report Manager

  13. Now, add the new variable to the report.
    Add the new variable to the report
  14. You can sort the report by the Commission Ranking.  If you want the highest commission listed first, sort the Commission Ranking column ascending.  If you want the lowest commission listed first, apply a descending sort.  To sort the column, select it and right-click, choose Sort and then select Ascending or Descending.

    The following report shows an ascending sort:
    Report shows ascending sort

Find out more about Dataspace's Business Objects training >>


Dataspace, in business since 1994, focuses exclusively on business intelligence consulting and education and offers a full spectrum of Business Objects authorized training and consulting services. For more information call 888 761-6371.

Business Objects Authorized Education Partner 

arrow  Contact Us

Making Data Make Sense

Upcoming 2008 Schedule

Web Intelligence XI R1/R2 (QA210R2)

MAY 12
Crystal Reports I (RD110R2)

MAY 14
Crystal Reports II (RD210R2)

MAY 16
Crystal Reports III (RD310R2)

BusinessObjects Enterprise XI R1/R2 (SA210R2)

BusinessObjects Enterprise XI R1/R2 (SA310R2)

Web Intelligence XI R1/R2 (QA210R2)

Crystal Xcelsius 4.5 Designing Interactive Presentations (BU271)

Crystal Xcelsius 4.5 Data Connectivity (PM281)

Universe Design XI R1/R2 (DM310R2)

Web Intelligence XI R1/R2 (QA210R2)

Web Intellgence XI R1/R2 - Advanced (QA320R2)


© 2007 Dataspace. Data warehouse and business intelligence consulting. All rights reserved.