Filter Field with LIKE based on another Field
Hi all!
Hopefully someone is able to understand what I'm trying to achieve and help with a solution.
I need to filter based on a "Tag" field with single text values, once selected would filter all relevant items in another dataset that has these tags in a single field "Tags" with multiple text comma delimited "tag1, tag2" for example.
Both created as a new beast mode "=tag_filtering" in both datasets to allow filtering.
Tag - "red" (used to filter)
Tags - "red,small" (needed to filter by)
My thought was a using beast mode something as below but have a feeling I may be well off, especially without having a wildcard % as part of the formula but having no joy, is this possible?
CASE WHEN `tag` LIKE `tags` THEN `GROUP_CONCAT(pt.tag)` END
Any input into the right direction is very much appreciated.
Thanks
Simon
Comments
-
Corrected mistake in above, CASE WHEN `tag` LIKE `tags` THEN `tags` END
0 -
@Simon_UK i've approached this problem several ways, applicability is dependent on your requirements.
My assumptions.
1) you have a lookup table with a field Tag containing a list of tags (RED, BLUE, GREEN)
2) your transactions have a column Tags with a semicolon delimited value containing tags.
GOAL
Use a checkbox or radio box filter card to select 'all transactions that match a tag'.
Approach 0)
use a filter card on the transaction tags column you can type to filter, so as you type 'red' all the transactions containing red will show up ... then you click. not great.... but it works without any extra effort or row duplication. not the best user experience. (do make sure you have the version of the checkbox filter card that allows you to type to filter, if you don't contact your CSM).
Approach 1)
JOIN Lookup to Transactions on a %LIKE% clause in ETL. This may cause row duplication if multiple tags from the lookup match your transaction table, but it will give you the ability to filter on individual values.
Approach 2)
Build a custom app
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 -
Thanks Jae, appreciate your details response and suggestions.
I opted for the easiest/quickest way, specifying each tag individually as its own case.
e.g
CASE WHEN `tags` LIKE '%tag1%' THEN 'tag1' END
Many Thanks
Simon
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 710 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive