cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate the Key Figure based on a Single row of a Structure in Crystal report

Former Member
0 Kudos

Hi,

While creating a Report in Crystal Reports 2011, was trying to fetch a Bex Query which had a Characteristics Structure in it. But my Report needs a Key figure to be calculated based on the single row of a Structure.

IE : If my Characteristics Structure had 5 rows, i need the Key figure to display only the value of 3rd row in that Structure.

eg:

If my Bex query has a Structure named India-Population-2011 as below

India-Population-2011

Delhi                         16.31M

Mumbai                     18.41M

Kokatta                       4.48M                   

Chennai                      4.68M

Now i need to display a Crystal Report only for Chennai using the Bex query as above

Chennai Population - 2011:

Chennai                      4.68M

Thanks,

Sowmya Sharma.

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Sowmya,

Go to the Record Selection formula and use this code:

{City} = "Chennai" //replace {City} with the city field from BEx query.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Thank u. Was able to achieve it through the Record Section Formula as u said.

-Sowmya Sharma.

abhilash_kumar
Active Contributor
0 Kudos

Glad I could help!

P.S: The best practise is not to create a Record Selection formula though. It is recommended to create a variable in the BEx query that filters the records on the SAP BW side. When you have a variable in the query, a parameter is created automatically in CR and it prompts the user for a value.

This way, CR only gets a filtered list of records which is more likely to perform better than a report that has a Record Selection formula when reporting against a BEx query.

-Abhilash

Answers (0)