# GETROWVALUE

The GETROWVALUE function returns the value of the source key row.

### Syntax

DS.(SERIES).GETROWVALUE(sourceKey: string) - > \[number]

### Arguments

sourceKey: string - string that corresponds to the source key.

### Example

Consider the below scenario where we have the Sales values for a Parent node. The objective is to allocate the Sales value of 2020 to all periods of the child node.

#### Parent

<table><thead><tr><th width="64">Year</th><th width="64">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>2019</td><td>8744503</td><td>8599938</td><td>8642337</td><td>8430046</td><td>8537787.6</td><td>8635150.9</td><td>8751803.7</td><td>8530118</td><td>8546371.7</td><td>8397872.3</td><td>8596191.1</td><td>8379559.9</td></tr><tr><td>2020</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr><tr><td>2021</td><td>1890876</td><td>1959373</td><td>2204492</td><td>1809924</td><td>1889838</td><td>1676175</td><td>1844642</td><td>2209590</td><td>1702085</td><td>1650029</td><td>2048406</td><td>1879161</td></tr></tbody></table>

To achieve this, the following formula should be written in the Child node:

<mark style="color:blue;">**`DS`**</mark>**`._Sum_of_2020.`**<mark style="color:blue;">**`GETROWVALUE`**</mark>**`(`**<mark style="color:blue;">**`THIS.PARENT.SOURCE_KEY`**</mark>**`).`**<mark style="color:blue;">**`GET`**</mark>**`(`**<mark style="color:blue;">**`CPI`**</mark>**`)`**

{% hint style="info" %} <mark style="color:blue;">**THIS\_SOURCE\_KEY**</mark> function is explained in detail in [this section](/model/formula-functions/range-functions/this_source_key.md).
{% endhint %}

### Result

#### Child

<table><thead><tr><th width="64">Year</th><th width="64">Jan</th><th width="64">Feb</th><th width="64">Mar</th><th width="64">Apr</th><th width="64">May</th><th width="64">Jun</th><th width="64">Jul</th><th width="64">Aug</th><th width="64">Sep</th><th width="64">Oct</th><th width="64">Nov</th><th width="64">Dec</th></tr></thead><tbody><tr><td>2019</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr><tr><td>2020</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr><tr><td>2021</td><td>8188477</td><td>7959189</td><td>7470250</td><td>7688532</td><td>8221765</td><td>7188152</td><td>7341150</td><td>8265013</td><td>7718777</td><td>8299877</td><td>8550181</td><td>8544909</td></tr></tbody></table>

### Explanation

GETROWVALUE allows the node to look into the row of the parent as mentioned in the formula and get the sum of 2020 value for all periods.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.valq.com/model/formula-functions/range-functions/getrowvalue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
