# Import/Export

The **Import/Export** functionality allows users to seamlessly manage templates by importing pre-existing configurations or exporting newly created templates. This feature simplifies the process of reusing templates and sharing them across different reports or teams.

<figure><img src="https://2952853741-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL502qSSR9Gd1FbZtxvCe%2Fuploads%2FNZHNLSiCaJfUh8ROWqhT%2Fimage.png?alt=media&#x26;token=7735e8cf-c5d5-407f-9e92-a798ee709d9b" alt="" width="563"><figcaption></figcaption></figure>

***

## **Import Templates**

The **Import** option lets users load templates into the visual using two methods:

**1. Upload a JSON File**

<figure><img src="https://2952853741-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL502qSSR9Gd1FbZtxvCe%2Fuploads%2FXkHCsiBjnEoR1ByQSAWY%2Fimage.png?alt=media&#x26;token=684b995b-6fa0-47aa-a682-3af2557ea09e" alt="" width="563"><figcaption></figcaption></figure>

* Click on the **Upload** button.
* Browse and select the JSON file containing the template configuration.
* Once uploaded, the template settings will be applied to the visual automatically.

**2. Paste JSON Code Directly**

<figure><img src="https://2952853741-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL502qSSR9Gd1FbZtxvCe%2Fuploads%2FQC5gey7t9VFjofsfmk5y%2Fimage.png?alt=media&#x26;token=e9057c12-af5b-4cdb-a69a-3bd6938af3a0" alt="" width="563"><figcaption></figcaption></figure>

* Copy the JSON code from an external source.
* Paste the code directly into the provided window in the Import section.
* Click **Import**, and the template will be loaded.

***

## **Export Templates**

The **Export** option allows users to save their customized templates for future use.

<figure><img src="https://2952853741-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL502qSSR9Gd1FbZtxvCe%2Fuploads%2F7DFusopsSIbFcWivlzfL%2Fimage.png?alt=media&#x26;token=b09becc2-8a7e-45a8-b53d-c7d60c665f85" alt="" width="563"><figcaption></figcaption></figure>

**Steps to Export a Template**

1. **Name**: Provide a unique name for the template.
   * The name will help identify the template when reusing or sharing it.
2. **Description (Optional)**: Add a short description to explain the purpose or details of the template.
   * This is especially useful for keeping notes or sharing templates with others.

***

#### **Dataset Configuration**

When exporting a template, it is essential to configure the dataset details to ensure accurate replication of the template’s functionality.

**1. Dataset (Columns and Measures)**

* Assign the measures and columns used while creating the template.
* This ensures that the template is tied to the correct fields for seamless application.

**2. Template Field Name**

* Provide the **name of the field** used in the template.
* For example, if the template involves a "Sales" field, name it appropriately to ensure clarity.

**3. Type**

* Define whether the field is a **category**, **value**, or **measure**:
  * **Category**: Represents categorical data (e.g., Product Name, Region).
  * **Value**: Represents numerical data or metrics (e.g., Total Sales).
  * **Measure**: Represents calculated fields or DAX measures (e.g., Profit Margin).

**4. Template Field Name (Reference Name)**

* Assign a reference name for future use.
* This helps maintain consistency when reusing or applying the template in other visuals or reports.

**5. Notes (Optional)**

* Add any additional notes about the field or its use case.
* For example: _"Use this field for filtering sales data by region."_
* These notes provide guidance for users who might use the template later.

***

## **Summary of Key Steps**

1. **Importing Templates**: Choose between uploading a JSON file or pasting JSON code directly.
2. **Exporting Templates**: Name the template, optionally add a description, and configure the dataset details.
3. **Dataset Configuration**: Specify field names, types, and reference names to ensure the template works correctly across different datasets.
4. **Notes (Optional)**: Provide additional context or instructions for template use.
