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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 101 SQL DataFlows
- 622 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 745 Beast Mode
- 58 App Studio
- 41 Variables
- 686 Automate
- 176 Apps
- 453 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 395 Distribute
- 113 Domo Everywhere
- 276 Scheduled Reports
- 6 Software Integrations
- 125 Manage
- 122 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