Skip to Content
author's profile photo Former Member
Former Member

Reg: Calculated variable in graph

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 06, 2013 at 04:37 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Abhilash Kumar

      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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.