# Use Case: Display Net sales On a Dashboard by Subtracting Ad spend from Total Sales

### Begin by creating a workflow

Set up a new Workflow and name it 'Sales after Ad Spend'

<figure><img src="/files/zVzJRlB0JJdsvEroK5tU" alt="" width="375"><figcaption></figcaption></figure>

### Aggregate Ad Spend across Ad Networks <br>

Start with summing up the Ad Spend from all advertising networks. For the first network, Facebook, use the "Pull Data" building block.&#x20;

In this block, specify the integration name, select the business accounts (option to select all), and rename the building block to 'raw\_facebook.'

<br>

<figure><img src="/files/ElYuDKdbUCi8wEz1lBD7" alt=""><figcaption></figcaption></figure>

#### Focus on Ad Spend Only

Since we are interested only in the total ad spend, use the "Create Report" building block and rename it to "total\_facebook."<br>

<figure><img src="/files/hpV2tJBkqpecyxkyssFC" alt=""><figcaption></figcaption></figure>

To remove all dimensions, open the breakdown list and click "Clear all," leaving the dimensions list empty.

<figure><img src="/files/i1lpYKSqV7un2bQVjrUa" alt=""><figcaption></figcaption></figure>

Then, select the 'Spend' metric

<figure><img src="/files/olacCxQpiIZFbuDhYXGh" alt=""><figcaption></figcaption></figure>

And, review the results

<figure><img src="/files/oomJlqxaC00wFHhf6QT8" alt=""><figcaption></figcaption></figure>

Here is what we should see, as our spend:

<figure><img src="/files/d2boUJKIc9sk03C4Ul98" alt="" width="352"><figcaption></figcaption></figure>

#### Repeat for Additional Networks

For each advertising network, add a "Pull Data" block and strip all dimensions to leave a single line indicating the total ad spend.

<figure><img src="/files/wOqw6UT4ddIGuRawHdmN" alt=""><figcaption></figcaption></figure>

#### Combine Ad Spend Data

To consolidate the ad spend across networks, use the "Union" building block, renaming it "total\_adspend." Ensure this union includes only the datasets with dimensions removed.

<figure><img src="/files/VuNlt6iSjK4i2xUuxjDf" alt=""><figcaption></figcaption></figure>

### Incorporate Sales Data

Pull the sales data using another "Pull Data" building block and remove all dimensions here as well.

<figure><img src="/files/31EBxaMGs6ssPXmoeK64" alt=""><figcaption></figcaption></figure>

### Merge Ad Spend and Sales Data

Combine the Ad Spend and Sales data into a single dataset using an additional "Union" building block.

<figure><img src="/files/8cVCO73AdZEoQK1SlFA5" alt=""><figcaption></figcaption></figure>

\
\
The resulting dataset should have two columns.

<figure><img src="/files/Rb9zgd8yHuigznLkj55Q" alt="" width="375"><figcaption></figcaption></figure>

### Create Net Sales Metric

\
Use another "Create Report" building block, named "Sales after Ad Spend," to derive the net sales metric.&#x20;

Include the "Add Metric" child building block to define the metric name, type, and formula using the previously created columns.

<figure><img src="/files/7Mxdbc7PR34dOOpS65Ip" alt=""><figcaption></figcaption></figure>

### View and Validate the Result

Click the "View" button to confirm that the dataset now includes the required metric.

<figure><img src="/files/6F3WYdFDmv7wjauKTZ31" alt=""><figcaption></figcaption></figure>

### Display the KPIs on a new Dashboard

1. Open the dashboard screen.
2. Create a new dashboard
3. Select the Workflow created earlier.
4. Specify the dataset within the workflow that contains all three metrics.
5. Click "Create" to finalize the dashboard setup.

<figure><img src="/files/fTImYjkGJuVkektcxBtc" alt=""><figcaption></figcaption></figure>

<br>


---

# 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.getconduit.app/use-cases/use-case-display-net-sales-on-a-dashboard-by-subtracting-ad-spend-from-total-sales.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.
