# calculate sum at row level

General Discussions
Top achievements
Rank 1
Kalpesh V asked on 03 Feb 2011, 11:45 AM

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.

- Kalpesh

## 1 Answer, 1 is accepted

0
Peter
Telerik team
answered on 04 Feb 2011, 08:52 AM
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.
Tags
General Discussions