Skip to main content
waffle.svg
Domo Knowledge Base

How to Write a Filter Formula

Version 2

 

Intro

Filter Formulas enable Magic ETL DataFlow authors to easily filter out data using SQL-style syntax. The filter formula needs to be a logical (Boolean) expression. In other words, the result of your formula must be a True/False return. Now you can save time by using expressions like 'Column name' >= 7 or`Column name` BETWEEN 15 AND 20 rather than navigate the traditional Filter Configuration tab.

Common Logical Filters

A few examples of common logical filters are as follows:

  • `id` >= 7
  • `Percent Change` BETWEEN .35 AND .65
  • `Phone Number` LIKE ‘801%’ AND `Age` < 35 AND `State` = ‘California’
  • (`Age` > 20 AND (`Salary` / 12) > 40000) or `Age` > 50
  • REGEXP_LIKE(`Email`, ‘@gmail.com’)
  • `Product Type` IN (1, 3, 7, 9)