OR statements in card filtering
Hi folks - We have a dataset where users can have datapointA and datapointB. We want to build a card where an end user can have a filter that asks for any user has datapointA = 'green' OR 'databpointB = 'circle'.
When we put those two datasets in a dataflow/card and add the datapoints as Quick Filters, it automatically assumes we want datapointA = 'green' AND 'databpointB = 'circle'.
How do we build quick filter conditions that assume ORs?
Comments
-
I don't know of a great solution here if you are only able to use Quick Filters. You could build a beastmode but that isn't great.
CASE WHEN `datapointA` = 'green' OR `datapointB` = 'circle' THEN 'Yes' ELSE 'No' END
The issue with this is you would need a separate beastmode for each combination of ORs.
Something else you might try is combining the columns together.
CONCAT(`datapointA`,'|',`datapointB`)
This would give you a list of all unique ORs you might want. This issue here is you would need to select multiple values in the Quick Filter but this would allow you to pick any values in either column.
Your quick filter might look something like this.
blue|circle
green|circle
green|square
orange|square
etc
Then you would select all values with 'green' in the first half and all options with 'circle' in the second half. If you go this route I'd recommend ensuring there are no NULL values in these fields as any NULL value in a CONCAT causes the whole thing to return NULL.
CONCAT(IFNULL(NULLIF(`datapointA`,''),'N/A'),'|',IFNULL(NULLIF(`datapointB`,''),'N/A'))
This would turn any blank or NULL values in either column into 'N/A'.
1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 618 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 741 Beast Mode
- 58 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 395 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive