# PIVOT

#### Syntax

**PIVOT**(*range; numRowElements*)

1. *range* - the range whose content should be converted in a pivot structure - ***Value type**: a range of any data*
2. *numRowElements* - specifies how many starting columns from *range* should be used for the rows of the result range - ***Value type**: integer (optional, default value: 1)*

#### Remark <a href="#remarks.30" id="remarks.30"></a>

* The function converts the single values from range into values in multiple columns in the result range. Each value is specified by its (single or multiple) row and column attributes.

#### Examples

**Example 1** - PIVOT with one column for rows and one column for columns.

<figure><img src="/files/O1Ma0h6TsY1RATleWwO1" alt=""><figcaption></figcaption></figure>

**Example 2** - PIVOT function with two columns with row attributes.

<figure><img src="/files/Nbsh2I21a7OfkeAid15x" alt=""><figcaption></figcaption></figure>

**Example 3** - PIVOT function with two columns with column attributes.

<figure><img src="/files/VSa3vjYEjHxzIyUhhb7s" alt=""><figcaption></figcaption></figure>


---

# 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.nedyx.com/nedyx/clearlines-functions/range-functions/pivot.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.
