Forum Discussion
How to avoid nested IF loops
- 10 years ago
assuming your timestamp is generated, then they match a specific pattern - one that you can use to split the column into junk and the actual error string.
Once you have the cleansed column, you can generate the error type in mutiple ways.
1. In the query editor, use a custom column and the if ... then ... else M syntax
2. As a calculated column
3. As look up table in the query editor defined as a join.
Some other thoughts: if it's possible, you should try to solve this at the source of the problem, when the errors gets generated, insert an error code/type so uniquely identify them. String searchs are never too reliable.
The strings aren't identical, but the pattern must be somewhat predictable. I would approach this by trying to find a way to trim off the excess text rather than finding a match for a set error code. Can you give a couple of examples of what these error strings look like?
- itchyeyeballs10 years agoImpactful IndividualAs Anonymous says, a few examples of the error strings would be useful. If the timestamp is always a set number of characters it should be possible to trim to produce a clean list to work with