Formulae function for table instead of line by line
I have two tables. The first table i have a list of telephone numbers. The second table, a list of the first 3 digits of the number. I want to qualify the first with the next. Here is my formulae:
case when SUBSTR(Phone
,4,3) not in(NXX
) then 'no' else 'yes' END
so this is fine in that it qualifies line by line. However, I want it to compare against the whole table and validate. How can this be done in Domo?
Best Answer
-
It's going to compare line by line. How did you join the two tables together? If you are essentially want to "search" the nxx column to see if there is a match with your substring value, you would need to a cartesian join that would repeat all the nxx rows for each phone number and then you would filter where there is a match.
**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.0
Answers
-
Your substring is looking at digits 4,5, and 6 in a phone number, not the first 3. Wouldn't you want it to be
CASE WHEN LEFT(phone,3) = threedigitfield THEN 'Same' ELSE 'Different' 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.0 -
i want the 4,5,6 number as the first 3 are the area code. But I guess what i wanted to know is…. when i run this, does it look just at the line or look at the whole column of nxx?
0 -
It's going to compare line by line. How did you join the two tables together? If you are essentially want to "search" the nxx column to see if there is a match with your substring value, you would need to a cartesian join that would repeat all the nxx rows for each phone number and then you would filter where there is a match.
**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.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