# If-Else Calculation

#### Step 1: Open Configuration&#x20;

{% tabs %}
{% tab title="Dashboard extension" %}
Click on the container that has SuperTables running. This will display an arrow that you can click to open a menu. Upon opening the menu, click the 'Configure...' option to open the configuration panel for SuperTables.

<figure><img src="https://content.gitbook.com/content/e2zyseN6XFBaLs6YTcnd/blobs/JzxeG4VLn2zclaR8qB75/Screenshot%202024-07-26%20at%2010.19.27.png" alt=""><figcaption><p>Opening configuration panel in Dashboard </p></figcaption></figure>
{% endtab %}

{% tab title="Viz extension" %}
To open the configuration panel, simply click 'Format extension' in the Marks pane.

<figure><img src="https://1304574535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe2zyseN6XFBaLs6YTcnd%2Fuploads%2Fw5utOJdGi7lwy7cAHLRy%2Fimage.png?alt=media&#x26;token=e238d541-06e2-4d82-aa4e-a08e2c7d4bbf" alt="" width="247"><figcaption><p>Opening the configuration panel in Viz extensions</p></figcaption></figure>
{% endtab %}
{% endtabs %}

#### Step 2: Navigate to the Data tab

<figure><img src="https://content.gitbook.com/content/e2zyseN6XFBaLs6YTcnd/blobs/pHEx6g6km0B2CWfcNBoK/Screenshot%202024-07-26%20at%2010.54.43.png" alt=""><figcaption></figcaption></figure>

#### Step 3: Make a Calculation Column

On the left side of the data tab. There is pane that says calculations, expand that menu and click 'Make a calculation' to create one.

<figure><img src="https://1304574535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe2zyseN6XFBaLs6YTcnd%2Fuploads%2FDuApZY1xoH8U8lMwCVyS%2Fimage.png?alt=media&#x26;token=1e24fcee-1576-4ca1-b5fa-cbfcc4bdca41" alt=""><figcaption></figcaption></figure>

#### Step 4: Open If-Else Formulas Editor

To access the if Else Formula Editor, Click on the 'If-Else Formula Editor' button which can be found under 'Calculation'.

<figure><img src="https://1304574535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fe2zyseN6XFBaLs6YTcnd%2Fuploads%2FrXxrYR88ugXTPTr3otmF%2Fimage.png?alt=media&#x26;token=c3089c52-c02f-4683-b28a-645f252df6d4" alt=""><figcaption></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/e2zyseN6XFBaLs6YTcnd/blobs/Zj8kxfWIQ5nZGX3s5K5g/Screenshot%202024-07-30%20at%2013.30.24.png" alt=""><figcaption></figcaption></figure>

#### Step 5: Create your Calculation

In this case we will create a calculation that will display 0 if profit is lower than or equal to 0 but otherwise it will display the profit value.

<figure><img src="https://content.gitbook.com/content/e2zyseN6XFBaLs6YTcnd/blobs/C6tt1ZAriBXNIGnt7xid/Screenshot%202024-07-30%20at%2015.14.57.png" alt=""><figcaption></figcaption></figure>

Click save and Apply & Close.

<figure><img src="https://content.gitbook.com/content/e2zyseN6XFBaLs6YTcnd/blobs/haMDatJJEbrWwj7n5WXd/Screenshot%202024-07-30%20at%2015.16.48.png" alt=""><figcaption></figcaption></figure>
