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
- 296 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive