Tags

feature
15 Jul 2024 11:35 PM

If/Then

close

Problem:

We have a raw dataset, for instance, with the executed campaigns and the associated cost. We want to set a threshold to understand whether the cost for a campaign was high or low.

Resolution:

In order to achieve our goal we will need to apply a condition “If/Then” in order to set the threshold criteria and then compare all rows to that condition. In order to do so, we will be taking the following steps:

Step 1

Let’s open Conduit’s Workflows and add the “Pull Data” building block to the canvas and select our dataset.

Step 2

Let’s add the “Create Report/Aggregate” building block to the canvas and connect it to our dataset. At this point we are getting rid of all the columns we won’t be using to proceed with our task. In the breakdowns field we uncheck all the columns except “Campaign Name” and “Date” columns. In the metrics field we will leave only the “Cost” column. Should you want to rearrange the order of the columns you can do so, by dragging the names of the columns in whichever order you like. At this point our output shows us all the campaign names, the date when they took place and the relevant costs.

Step 3

At this point we need to add a new column to the report that would tell us whether the cost is High or Low. You can name the column however you like. Let’s add the “If/Then” building block to our canvas and connect it to our report prepared in Step 2. Now we need to set the right condition, so if the “Cost” is higher than 50$, then the value should be “High”. If the “Cost” is under 50$, then the value is “Low”. You can create columns with text values as well as numeric and other types of values.

Step 4

Now, let’s click at “View” to see our results. Now we see that for each of the executed campaigns the system is able to analyze whether the cost was higher or lower than the set standard.