# GETMEASURECOLUMNS

The GETMEASURECOLUMNS function returns the list of columns at the given level of a specific measure. If a level is not provided, the leaf columns are returned. This function returns a range of values, and has to be to used with an aggregation function like SUM/AVG.

## Syntax

```javascript
GETMEASURECOLUMNS(measure, level)
```

## Arguments

measure – The measure whose columns need to be returned. Required.

level – The level. Required. \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

## Example

```javascript
GETMEASURECOLUMNS([Sales], 1)

```


---

# 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.inforiver.com/formula-syntax/measure-column-selection-functions/getmeasurecolumns.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.
