How to filter for Tags (many-one relationship - multiple tags per field)
I have a dataset containing tags in which a row might have multiple tags applied. For example:
Keyword -- Tag(s)
Car -- blue
truck -- green, red
bike -- yellow, red, purple
How can I set up a filter for a dashboard/card which will allow me to filter down to just trucks and bikes when I filter by "red". Or just trucks when I filter by "green". Or cars and bikes when I filter by "blue" and "purple"?
I've tried case statements in Beast Mode (i.e. Case when
Tag(s) like '%green%' then 'green' when
Tag(s) like '%blue%' then... but it appears the Beast mode will select the first one that's applicable for each... so if I filter by "red" with this, it won't include either the trucks or bikes....
Thanks for any help!
You could use a contains filter instead of selecting a value from the list. Alternatively you could have your dataset list each record with the different tag for each record making sure to handle any possible duplicate records in your card processing.**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0
Thanks Grant. Are there any particular techniques you can advise on for handling duplicate records in my card processing?
If my example was the complete dataset, I'd want just 3 fields being pulled (car, truck, bike) if no filters were applied. Or if the user selects "yellow" and "purple", just one field (bike) would pop up (not 2: bike-yellow and bike-purple).0
@GrantSmith is giving you solid advice.
Typically there are two ways to handle 'mult-valued columns'.
1) you can increase your row count (one row per value) OR
2) you can add columns for isGreen isBlue isRed.
to handle avoid showing duplicate records, you could UNION a version of the row (car, truck bike) with the color "All Colors" this way when you filter to "All Colors" you know you don't have row duplication.Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
I'm solving a similar problem to the one here.
Reading through this, I somewhat confused on your last comment. Specifically this:
"… you could UNION a version of the row (car, truck bike) with the color "All Colors" this way when you filter to "All Colors" you know you don't have row duplication. "
I'm not sure what you mean here. Can you give an example? Would this be done in a dataflow? Or the original query for the datasource? And how does this exactly remove row duplication. I would assume the table would look something like this:
Keyword | Tag(s)
Car | blue
Truck | green
Truck | red
Bike | yellow
Bike | red
Bike | purple0
- 10.5K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 470 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 477 Datasets
- 193 Visualize
- 252 Beast Mode
- 2.1K Charting
- 11 Variables
- 80 Cards, Dashboards, Stories
- 17 Automate
- 354 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 247 Distribute
- 63 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 174 Product Ideas
- 1.2K Ideas Exchange
- 12 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive