Calculated Column Errors - count conditions when like this but not like that
I would like to create a column in my dataset with a count of distinct session_id's where column event_name is 'search' but does not have an event_name called 'select_item' present as well. Hoping a beast mode will work because this is a gigantic dataset that takes hours to run. let me know if you think adding directly to the big query query would be better however.
Here is the beast mode I tried and its not liking it.
COUNT(DISTINCT session_id
CASE WHEN event_name
NOT LIKE '%select_item%' and event_name
LIKE '%search%' then 'Refined' END )
thanks!
Best Answer
-
Hmm it is validating for me when I replicate it in my instance. Can you share a screenshot of your beastmode?
If I solved your problem, please select "yes" above
0
Answers
-
Should work if you remove the then 'Refined' part at the end and move the
session_id
. See below:COUNT(DISTINCT CASE WHEN
event_name
NOT LIKE '%select_item%' andevent_name
LIKE '%search%' THENsession_id
END )Keep in mind that you are using wildcard characters around select_item and search which will return values that contain characters on either side of that string search.
If I solved your problem, please select "yes" above
3 -
thanks so much for the response. I tried the formula provided and it says there's a calculation error :(
0 -
Hmm it is validating for me when I replicate it in my instance. Can you share a screenshot of your beastmode?
If I solved your problem, please select "yes" above
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive