# PERCENTOF

## Content

This function is used to calculate the percentage of a subset of data relative to the entire dataset. It is particularly useful when combined with the GROUPBY and PIVOTBY functions to return percentages.

## Syntax

`PERCENTOF(data_subset, data_all)`

## Arguments

The function has following arguments.

| **Argument** | **Description** |
| -------- | ----------- |
| *data\_subset*<br>*(Required)* | The values in the subset of data you want to analyze. |
| *data\_all*<br>*(Required)* | The values that make up the entire set. |

## Example

`PERCENTOF(Sales_2019, Total_Sales)`