How would I filter for Order Numbers that contain UN codes? While keeping all other part numbers
Hi all,
I am trying to figure out how to do this in Analyzer via Beastmode or filter tool. I am trying to only filter/display Orders that contain a product with a UN battery code while still displaying all other items in that Order Number. I'm having a tough time finding a function that could do this. Any ideas? Thanks in advance!
Best Answers
-
Create the following beastmode:
CASE WHEN `UN Number` IS NOT NULL THEN 'Include' ELSE 'Exclude' ENDThen drag the newly created beastmode into the filter section in analyzer and filter to include "include"
If I solved your problem, please select "yes" above
0 -
I'm noticing your formula should be !='' or >=1 to get the non-empty results.
It's also possible in addition to an empty string, you could have a string comprised of white spaces, which would have a length greater than 0 and not be equal to ''
''
vs.
' '
To account for that, I think wrapping your code in TRIM() should remove any invisible extra spaces that might be in that column.
Adapting @ColemenWilson's answer, you could do something like:
CASE
WHEN `UN Number` IS NOT NULL THEN 'Include'
WHEN trim(`UN Number`) <> '' then 'Include'
ELSE 'Exclude'
END
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
2
Answers
-
Create the following beastmode:
CASE WHEN `UN Number` IS NOT NULL THEN 'Include' ELSE 'Exclude' ENDThen drag the newly created beastmode into the filter section in analyzer and filter to include "include"
If I solved your problem, please select "yes" above
0 -
Hi @ColemenWilson ,
Thanks for your response. I tried that beastmode and applied it but it still displays Order Numbers that do not have UN Number. An example below:
Null fields can be tricky sometimes with our datasets. We've had to use prompts such as When UN Number = '' and when length('UN Number') < 1 as well because they can be empty strings. So I will try that.
Edit: I tried this and got the same result as before.
0 -
I'm noticing your formula should be !='' or >=1 to get the non-empty results.
It's also possible in addition to an empty string, you could have a string comprised of white spaces, which would have a length greater than 0 and not be equal to ''
''
vs.
' '
To account for that, I think wrapping your code in TRIM() should remove any invisible extra spaces that might be in that column.
Adapting @ColemenWilson's answer, you could do something like:
CASE
WHEN `UN Number` IS NOT NULL THEN 'Include'
WHEN trim(`UN Number`) <> '' then 'Include'
ELSE 'Exclude'
END
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
2 -
Ah good ol' empty strings!
If I solved your problem, please select "yes" above
1
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.8K Visualize
- 2.5K Charting
- 737 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 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