# R.PROPORTION

## Content

This function is used to get the proportion of cell values.

## Syntax

`R.PROPORTION(ValueCell, [ContextCell1], [ContextCell2])`

## Arguments

<span style="color: rgb(34, 34, 34); font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Noto Sans, Liberation Sans, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji, Font Awesome 5 Free; font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(255, 255, 255); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">This function has the following arguments.</span>

| **Argument** | **Description** |
| -------- | ----------- |
| *ValueCell* | [Required] Specify the cell for which value you want to get the proportion. |
| *ContextCell1* | [Optional] Specify context cell 1, which usually is the year cell.<br>Example:<br>If the A2 cell is bound to the year column, B2 cell is bound to the month column, C2 cell is bound to the sales column, then,<ul><li>R.PROPORTION(C2) will return the current sales proportion in all years' sales.</li><li>R.PROPORTION(C2, A2) will return the current sales proportion in current year sales.</li></ul> |
| *ContextCell2* | [Optional] Specify the context cell 2.<br>If the value cell is a cross cell, this argument must be specified. |

**Example 1: The value cell is a normal cell**
Template:
![image](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/d37fbce1-6a37-43ce-b728-dd79fba68421/image.ed7a77.png?width=600)

Preview:
![image](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/d37fbce1-6a37-43ce-b728-dd79fba68421/image.c94fbb.png?width=600)
**Example 2: The value cell is a cross cell**
Template:
![image](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/d37fbce1-6a37-43ce-b728-dd79fba68421/image.8845d9.png?width=500)

Preview:
![image](https://gcdocumentsitekrblob.blob.core.windows.net/document-site-files/images/d37fbce1-6a37-43ce-b728-dd79fba68421/image.c674d6.png?width=750)