Does Beast Mode support using "Contains" to Identify Value Count
Hey there…
I have a field called PresentationName where we (unfortunately) use a text string as part of the PresentationName to identify a Type of presentation. Clearly we need to pull that out into its own metadata and will in the future.
But for now, I need to find a way to create a calculated field that lets me get a count of PresentationName where the PresentationName contains "self-service" text string.
Any thoughts on how to structure this?
Thank you
Best Answers
-
@afieweger Yes, you will use LIKE and wildcard characters in your case when statement:
SUM(case when PresentationName LIKE '%self-service%' then 1 else 0 end)
The % symbol will just say there can be any number of characters before or after 'self-service'. I like doing counts with an equivalent sum expression.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**
1 -
you can use the LIKE operator with the % sign on each side to make it look for the phrase contains. Would be something like this:
CASE WHEN fieldname LIKE '%self-service%' THEN 'Self-Service'
ELSE 'Something else'
END
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Answers
-
@afieweger Yes, you will use LIKE and wildcard characters in your case when statement:
SUM(case when PresentationName LIKE '%self-service%' then 1 else 0 end)
The % symbol will just say there can be any number of characters before or after 'self-service'. I like doing counts with an equivalent sum expression.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**
1 -
you can use the LIKE operator with the % sign on each side to make it look for the phrase contains. Would be something like this:
CASE WHEN fieldname LIKE '%self-service%' THEN 'Self-Service'
ELSE 'Something else'
END
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
Can you put a variable inside the %s? So:
CASE WHEN fieldname LIKE '%'variable a'%' THEN 'Self-Service' ELSE 'Something else'
1 -
Same question as Charlie ^^
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive