# SHOWCLOSEDFORECAST

With Plan, you can create forecasts using manually entered values, data from previous periods or apply formulae to generate the forecast. The forecast is generated for previous periods as well. For example, if you are creating a forecast for 2024 based on data from 2023, the forecast measure will be created even for the 2023 columns. You can choose to show or hide the forecast columns for previous periods using the SHOWCLOSEDFORECAST function.

### Syntax

```javascript
SHOWCLOSEDFORECAST(BOOLEAN_ARG)
```

### Arguments

BOOLEAN\_ARG - Set to TRUE to show forecasts for closed periods. Set to FALSE to hide forecasts for closed periods.

### Example

```
SHOWCLOSEDFORECAST(TRUE) #Displays the forecast measure for previous periods
SHOWCLOSEDFORECAST(FALSE) #Hides the forecast measure for previous periods
SHOWCLOSEDFORECAST(THIS) #Use with a toggle variable to show or hide forecasts for closed periods
```


---

# 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.fabricplan.com/planning-sheets/formula-syntax/scripting-functions/showclosedforecast.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.
