> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siftstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Step 6: Create Calculated Channel and view it in Sift

export const SiftIcon = ({className}) => <span className={`inline-flex items-center align-middle text-black dark:text-white ${className || ''}`}>
    <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Artwork" x="0px" y="0px" viewBox="0 0 1005.58 733.96" style={{
  enableBackground: "new 0 0 1005.58 733.96",
  width: "2em",
  height: "2em"
}} xmlSpace="preserve">
      <path fill="currentColor" d="M552.16,150.89c-165.6,0-180.29,160.61-300.62,192.32v2.67h601.24v-2.67C747.74,324.18,717.72,150.89,552.16,150.89z   M453.46,583.08c165.6,0,180.29-160.61,300.62-192.32v-2.67H152.84v2.67C257.88,409.78,287.91,583.08,453.46,583.08z" />
    </svg>
  </span>;

## Overview

As in Step 6 of the first tutorial, let's create a Calculated Channel that computes the difference between `max_air_temp(C)` and `min_air_temp(C)` to capture the daily air temperature swing. This time, we will do it using the REST API instead of the UI. The endpoint we will use to create the Calculated Channel is [CreateCalculatedChannel](/api-reference/calculatedchannelservice/createcalculatedchannel).

## Create Calculated Channel

Run the cURL command below to create the Calculated Channel.

```bash theme={null}
curl -X POST "YOUR_REST_API_URL_HERE/api/v2/calculated-channels" \
  -H "Authorization: Bearer YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "fl_demo_calculated_channel",
    "calculatedChannelConfiguration": {
      "assetConfiguration": {
        "selection": {
          "assetIds": ["ASSET_ID"]
        }
      },
      "queryConfiguration": {
        "sel": {
          "expression": "$1 - $2",
          "expressionChannelReferences": [
            {
              "channelReference": "$1",
              "channelIdentifier": "max_air_temp(C)"
            },
            {
              "channelReference": "$2",
              "channelIdentifier": "min_air_temp(C)"
            }
          ]
        }
      }
    }
  }'
```

**Placeholders**

* Replace `YOUR_REST_API_URL_HERE` with your REST API URL obtained in the previous step.
* Replace `YOUR_API_KEY_HERE` with your API key obtained in the previous step.
* Replace `fl` (in `fl_demo_calculated_channel`) with your initials.
* Replace `ASSET_ID` with the ASSET ID you copied in [Step 3](/old-learning-path/tutorial-2/step-3#view-imported-data-in-sift).

<Accordion title="A successful response">
  ```bash theme={null}
  {
  "calculatedChannel": { 
      "calculatedChannelId": "string",
  ....
  }
  ```
</Accordion>

## Plot Calculated Channel in Sift

Now that we have created the Calculated Channel using the REST API, let's view the created Calculated Channel in Sift.

1. In **Sift**, click <SiftIcon className="icon-sift" />.
2. Click the <Icon icon="stopwatch" /> **Runs** tab.
3. In the **Run name or description** box, enter the name of the created Run.
4. Click your Run from the search results to open it.
5. Click <Icon icon="arrow-up-right-from-square" /> **Explore**.
6. In the <Icon icon="wave-pulse" />  **Channels** tab, click the following Channels:
   1. <Icon icon="hashtag" /> **max\_air\_temp(C)**
   2. <Icon icon="hashtag" /> **min\_air\_temp(C)**
7. Click the <Icon icon="wave-pulse" /><Icon icon="plus-minus" /> **Calculated Channels** tab.
8. In the **Calculated Channels** tab, click the name of the created Calculated Channel.
