Any way to get text value from one column based on text value of another column?
I've got a data set that is a series of user and assistant responses. I'm trying to build a table visualization that will show me all user questions where the assistant did not have an answer.
My thought was that I could search for the default “no answer” response in the assistant response columns, but am stuck at how to then return the user question that prompted the “no answer response" as a value that I can display in a table.
I was attepting to use
CASE WHEN DP DP Response 2
= ‘DP: Sorry, I don't have an answer for that.’
THEN User Question 2
END
but kept getting syntax errors and not sure if that's just not possible w/ text or if I've missed something completely. Also realize I may not be able to use the full text due to the use of apostrophe so will likely need to try to search by contains ‘DP: Sorry’ but Beast Mode doesn't seem to recognize CONTAINS?
Screenshot of one of these occurences within the data attached. Help?
Best Answer
Answers
-
@MichelleH that did help with the syntax error, but somehow I'm getting no data returned with that formula as a whole. Do you know if I'm missing something that would actually pull through the value of the “User Question 2” column?
0 -
@aarguijo Does it still return no values if you change it to this?
case when DP Response 2 LIKE ‘DP: Sorry%’ then 1 end
If you see 1s populating, then that means there's not data in the User Question 2 field. If not then there's something wrong with the condition, for example there are extra spaces in the string you're searching
1 -
Ah I figured it out. It wanted a % at the start of the string as well - so
case when DP Response 2 LIKE ‘%DP: Sorry%’ then User Question 2 end
Thanks so much for your help!
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 600 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 685 Beast Mode
- 43 App Studio
- 38 Variables
- 655 Automate
- 170 Apps
- 438 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 383 Distribute
- 110 Domo Everywhere
- 267 Scheduled Reports
- 6 Software Integrations
- 111 Manage
- 108 Governance & Security
- 8 Domo University
- 25 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive