Skip to content

Mission 4 - Filtering the Dataset

Estimated time for completing this mission: 15 mins

Learning Objective

Understanding how certain records can be filtered out from the dataset using BLOX.

Scenario

Imagine that you discover that the dataset contains some invalid data (negative amounts in our case). How would we go about filtering them out and leaving only those records that contain positive values in the Amount column?

BLOX used in this mission:

  • Basics/Start
  • MyData/business_transaction
  • Database/Sort
  • Database/Update

startBlox

BLOX used in this mission

Data

In this mission we will use the processed dataset from the previous section. If you didn’t create it in the previous mission, here is a link for the dataset: business_transactions.xlsx

Steps

Please refer to the Navigation Guide to perform the steps below

  1. In the Flow Builder, drag-and-drop all the necessary BLOX listed above
  2. Connect the "Start" to "MyData" BLOX
  3. Click on “MyData” BLOX and go to the column you want to filter (amount), by clicking on the first box you can choose the operation ("Greater Equal" in our case) and the filter operand (0 in our case) in the second box. With this step, we filter out the invalid (in our case negative) data points
  4. Now we want to sort the data by the column "Amount" in a descending order. It is your task to implement that
  5. Hint Specify "Amount" as the column which is being used. The order should be "Descending"!
  6. Next connect the output from "Sort" BLOX to "Update" BLOX, and specify the dataset to be updated (business_transactions.xlsx in our case)
  7. Now pressing the start button on "Start" BLOX, will activate the logics chain and the outcome can be seen by double clicking on the "Sort" BLOX

Image title

Filter Amount

Tip

The "Create Filter" BLOX does not filter data but creates a filter expression using the given operator and operand that can be used in the data table avatars

Tip

In all operations (except "between") of the "Create Filter" BLOX, only the first operand needs to be set.

Results and Summary

You can now easily perform all sorts of filtering operations on columns. Now you have created a modified dataset, which will be used some of the following sections. ​ ​

Image title

Final logic of filter operation

Image title

Final table of filter operation

Well done! Now let's move on to the next mission!