SAP Knowledge Base Article - Public

1292383 - Graph for top N highest value

Symptom

How to create a report with a graph for top 5 highest values. And that breaks out each of the 5 cars for the top 5 names with the highest car amount. The graph should display the Names and its Amounts.
For Example:

ID

Name

BMW

DOG

GE

TOYOTA

1

Lucy

3

14

6

2

2

Wendy

2

1

15

3

3

Jhon

13

2

1

2

4

Ann

1

14

2

9

5

Rich

24

3

5

2

6

Chris

4

2

3

19

7

Tifni

15

6

4

1

 From the above table it should display the top 5 highest Car amount and names.

Reproducing the Issue

Environment Details:

Business Objects Enterprise: XI R1, R2, R3

Crystal Designer: XI, XIR2,2008

OS: Windows Server

Database: Any Database

Resolution

1.Create a formula "Highest"

  numberVar array arr;

  arr:=MakeArray({BMW},{DO},{GE},{Toyota});

  Maximum (arr)

Since the BMW,DOG,GE,Toyota are the column names. We need to create an array and using that array we need to create the maximum values for each name.

2. Insert a chart, On Change of the "Name" and in Show Values select the formula name "Highest".

3. Select the TopN tab. Group Sort Expert Window is opened.

4. In For this Group Sort, Select "TOPN" where N=5 and Select "Include Ties" then OK

5. Refresh the report, the chart displays the Top 5 Highest values.

Keywords

How to create a report with a graph for top 5 highest values.
, KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports XI R2