Providing a True/False(Y/N) if text in a comma separated string is in a separate column
Hello,
I have data that looks like this and the goal is to validate if the order season is in the selling season. I tried like but it didn't seem to be consistent. Any help would be appreciated.
Order Season | Selling Seasons | Goal |
18SP | 18SP,18SU,18FA,19SP | Y |
19FA | 18SP,18SU,18FA,19SP | N |
18FA | 18SP,18SU,18FA,19SP | Y |
20SP | 18SP,18SU,18FA,19SP | N |
Thank you,
DMJerry
0
Best Answer
-
Do you have an example of your like statement or how it wasn't consistent?
Like should work to determine if the order season is in your selling season CSV string.
CASE
WHEN `Selling Seasons` like CONCAT('%', `Order Season`, '%') THEN
'Y'
ELSE
'N'
END**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2
Answers
-
Do you have an example of your like statement or how it wasn't consistent?
Like should work to determine if the order season is in your selling season CSV string.
CASE
WHEN `Selling Seasons` like CONCAT('%', `Order Season`, '%') THEN
'Y'
ELSE
'N'
END**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2 -
Thank you! The concat was the key that I missed. Appreciate it sir!
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 7 Cloud Amplifier
- 9 Federated
- 3K Transform
- 114 SQL DataFlows
- 654 Datasets
- 2.2K Magic ETL
- 4.1K Visualize
- 2.5K Charting
- 803 Beast Mode
- 79 App Studio
- 44 Variables
- 758 Automate
- 188 Apps
- 480 APIs & Domo Developer
- 73 Workflows
- 17 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 408 Distribute
- 119 Domo Everywhere
- 279 Scheduled Reports
- 10 Software Integrations
- 141 Manage
- 137 Governance & Security
- 8 Domo Community Gallery
- 47 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive