# THIS\_SOURCE\_KEY

The THIS.SOURCE\_KEY function returns the value of the mentioned source key row from the data series.

### Syntax

DS.(SERIES).THIS.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`**</mark>**`.`**<mark style="color:blue;">**`PARENT`**</mark>**`.`**<mark style="color:blue;">**`SOURCE_KEY`**</mark>**`).`**<mark style="color:blue;">**`GET`**</mark>**`(`**<mark style="color:blue;">**`CPI`**</mark>**`)`**

{% hint style="info" %}
To know about **GETROWVALUE** function, click [here](https://docs.valq.com/model/formula-functions/range-functions/getrowvalue).
{% 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

PARENT.SOURCE\_KEY allows the node to look into the source key value of the parent as mentioned in the formula and get the sum of 2020 value for all periods.
