Not in formula filter on ETL
Hey, I am attempting to use the not-in function to filter out reversal charges.
I have a reference column and a memo column. The reference column has a transaction ID and I want to filter out the charge and the reversal.
I am writing a filter Memo Number
not IN(Reference Number
) but it only outputs the reversal only. see the attached document. I want to filter out both highlighted cells. Currently, it's only showing the red line.
Another way to explain is I want the take an array and say if a memo number matches any referance number then filter out both.
example.
Best Answer
-
You'll have to do some work in ETL and join each memo row with each reference number so you can compare the two values on the same row. Once filtered, you can use a group by to return the data to the proper granularity to use in your card.
To join all data with all other data you'll need to use the add constants tile and add a "1" to every row of data then self join the data back to itself on the new constants column. This will essentially join each row with every other row so you can compare every row with every other row to check to see where there are the matches you are looking for.
If I solved your problem, please select "yes" above
0
Answers
-
You'll have to do some work in ETL and join each memo row with each reference number so you can compare the two values on the same row. Once filtered, you can use a group by to return the data to the proper granularity to use in your card.
To join all data with all other data you'll need to use the add constants tile and add a "1" to every row of data then self join the data back to itself on the new constants column. This will essentially join each row with every other row so you can compare every row with every other row to check to see where there are the matches you are looking for.
If I solved your problem, please select "yes" above
0 -
If I am understanding the question, I think you might want to be using LIKE instead of IN. Using like with % signs on both sides of the field will make it look for that string anywhere within the other string. I tend to do this in a formula tile first and return a 1 or 0 and then use the filter tile to filter on 1 or 0. Here's an example where I look for a body part within a description field.
CASE WHEN LOWER(
eventdescription
) LIKE CONCAT('%', LOWER(bodypart
) ,'%') THEN 1 ELSE 0 ENDA few things to note. It is case sensitive so that is why I use the lower function to make it all lowercase. Since I am comparing one field to another, I need to use the CONCAT to build the % signs around the body part field.
Hope this helps.
**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 have the numbers isolated through some text splitting but the issue im having is how it checks at the individual record level. Since the charge and reversal will never be on the same row i cant use = or like.
In the example below are two changes i want to to remove both since the reversal has the same transaction ID of the first reference row.
reference
memo
(Transaction #467038977)
charges etc text
(Transaction #467267003)
Reversal of transaction ID:467038977
0 -
Yep, so as I mentioned you will have to join each row with every other row to check both columns.
If I solved your problem, please select "yes" above
0 -
just to add i am trying out Colemon's solution because i think that will work… i just feel like there should be a simpler solution than im seeing.
0 -
Colemen is correct. It will temporarily explode your dataset, but then you filter it back down. Magic ETL processes it pretty quickly, though.
**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
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 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