Hi there

I use addsummaryrows function to aggregate the values of columns but I need to get value of specific cells

could anyone know a method to accomplish this

I attached image that highlight the value I trying to fetch

You should change your way of thinking / approaching the problem.

Filtering should be done via Filter as normal, not "later".

If you need specific **rows** then you should just setup your Filter variable so only required rows are used. If you need to sum only certain values, set remaining values to zero:

```
AddColumn( IIF( _is_this_value_needed, value, 0 ), "Extra column");
```

Also your picture is unclear. You said you "highlighted" the value (singular form). There are MANY highlighted values in the picture with different colors (yellow, red and green) and nobody knows what you really want. You have to be PRECISE. Please follow this advice: How to ask a good question

Hi @Tomasz

Thank you for your response ,the highlighted the yellow part

also the aggregation on watchlists so there is some limitations to do the filter as normal

thanks again

You really have to be precise when asking for help and definitely tell much more than you do. There are 2 highlighted items and still it is NOT KNOWN what you want to do with them as they are ALREADY totals.

Unfortunately your question does not provide all necessary details to give you an answer. Please follow this advice: How to ask a good question

well, I need to calculate the percentage of "Daily TurnOver" for each symbol from the total in the watchlist

thus the formula will be the (symbol value /Total)

and store the values in new column

In that case this can be done but not the way you think.

Every calculation needs to be done **before** data is displayed.

So total must be calculated first and percentages should be calculated after but ALL before you display results.

To calculate total, you can iterate thru symbols

```
if( status("stocknum") == 0 )
{
// calculate total by iterating thru symbols - SetForeign
// store total into static variable
StaticVarSet("TotalTurnover", .... );
}
percentage = 100 * Close * Volume / StaticVarGet("TotalTurnover");
AddColumn( percentage, "Percentage");
Filter = ....
```

Alternatively you can implement a batch. First step in batch would be a scan to produce composite

```
if( status("stocknum") == 0 )
{
// remove any earier composite values
StaticVarRemove("TotalTurnover");
}
StaticVarAdd( "TotalTurnover", Close * Volume );
Buy = 0;
```

and in second batch step (exploration) you would just use totals to calculate percentage

```
percentage = 100 * Close * Volume / StaticVarGet("TotalTurnover");
AddColumn( percentage, "Percentage");
Filter = ....
```

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.