cancel
Showing results for 
Search instead for 
Did you mean: 

Reg: Calculated variable in graph

Former Member
0 Kudos

Hi,

can you please suggest me how to use the calculated variable in graph. When I tried using the calculated variable the results that are provided is way bigger than the expected.

Formula used -

if 'A', 'B' and 'C' are my objects from the query in which A is a measure and B is a dimension then in the crystal report i am using sum(A)/Sum (A,B).

I have used Group expert and grouped the data by 'B', 'C'. The graph I am having will be displayed under the Group header of 'C'.

Appreciate  your help

Regards,

Kiran

Accepted Solutions (0)

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

If you want the numbers for just the C group, I would change the formula to something like this:

Sum(A, C)/Sum(A, B)

"Sum(A)" gets you the grand total for the report, not the total for the group where you're putting the calculation.

-Dell

Former Member
0 Kudos

Hi,

Thank you. I have tried this formula but could get the result right. My X-axis here is Month number

The number that the report is showing is different from actual results

Regards,

Kiran

abhilash_kumar
Active Contributor
0 Kudos

Hi Kiran,

Please post a data sample and the expected results.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

I am having Metric 1 that gives me the numeric values splitted monthwise at Region and Country level.

Now I have created groups for Region and Country. Placed a two different graphs in group headers of region and country. These are having X-axis as Months and Y-axis with Metric 1 and a calculated variable. Below is calculation for calculated metric

Calculated variable = if drilldowngrouplevel = 0 then Sum(Metric1, Region)/sum(metric 1 , Region) else Sum(Metric1, country)/sum(metric 1 , Region)

When i used this variable in graph, values are not matching and its giving incorrect values. Please let me know if i am doing something wrong in creating variables

Regards,

Kiran