> For the complete documentation index, see [llms.txt](https://docs.coherent.global/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coherent.global/build-spark-services/additional-mappings/circular-references-xcircular_switch.md).

# Circular references (Xcircular\_switch)

Syntax: `Xcircular_switch`&#x20;

Calculate circular references in your Spark service.

1. Anywhere in your workbook, select a blank cell.
2. Enter `TRUE` into the cell.
3. Give it the [name](https://support.microsoft.com/en-US/Excel/get-started/define-and-use-names-in-formulas) `Xcircular_switch`.
4. Find your circular reference.
5. Select any cell within the circular reference loop.
6. Update your formula to only run the function when `Xcircular_switch=TRUE`.
7. Check your iterative settings in Excel from **File**, **Options**, **Formulas**.
8. Check **Enable iterative calculation** to enable circular references in Excel. By default, Excel will set `Maximum Iterations` to `100`, and `Maximum Change` to `0.001`.
9. Upload the file to Spark. The **Upload log** will include a similar entry: `INFO: Cell Sheet1!B2: INFO: Circular references detected in workbook. Spark will process the circular references with the following settings: max iterations 100, max change 0.001.`

Spark will match the **Maximum Iterations** up to `250`. If **Enable iterative calculation** is not enabled in the file, Spark will default Maximum Iterations to `100` and `Maximum Change` to `0.001` in the Spark service.

## Sample file

This service can be uploaded to Spark to use as a simple example.

{% file src="/files/Nr1r3uDVBDj8Xwm5qEKU" %}
