calculate sum at row level

2 posts, 0 answers
  1. Kalpesh V
    Kalpesh V avatar
    12 posts
    Member since:
    Jun 2010

    Posted 03 Feb 2011 Link to this post

    Hi Support Team,

    I am using Telerik reporting V4.2

     

    Value

    Vertical Relevance (%)

    200

    20

    300

    30

    500

    50

    Total

    1000

    100

     

    I want to calculate vertical relevance field as shown in above.

    Formula:

    Vertical relevance = (Value/ Total value) * 100

    Example: (of first row)

                    20% = (200/1000) * 100

    I am get not sum (total value = 1000) at row level, it return 200 for total.

     Please help me to calculate Vertical relevance.

    Thanks in advance for support.

    - Kalpesh

  2. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 04 Feb 2011 Link to this post

    Hi Kalpesh V,

    The Sum aggregate in detail row will return the sum of the current data scope (detail), not the report or the table. Usually the Sum Aggregate is used in Group Header/Footer, Report Header/Footer and Table Groups. In order to achieve your scenario our suggestion is to use the Exec(scope, expression) function that executes the specified expression in the given data scope. This function allows changing of the data scope in which the expression is evaluated. Scope parameter is the name of the data scope we need to evaluate the expression against. For example the following expression will calculate the vertical relevance:
    =Value/Exec("Table1", Sum(Value)) * 100

    Best wishes,
    Peter
    the Telerik team
    Get started with Telerik Reporting with numerous videos and detailed documentation.
  3. DevCraft banner
Back to Top