Criteria Operator
Is there a way to get the a Criteria operator to act like a "Contains" operator? Need to get only customer names that contain a specific word in their name. How else could I accomplish this task?
1
Is there a way to get the a Criteria operator to act like a "Contains" operator? Need to get only customer names that contain a specific word in their name. How else could I accomplish this task?
Comments
Hi Matteo,
The closest I can get to a "Contains" operator is to use the Search option in the criteria editor.
In this example, I have searched for "kids" and found 27 members containing "kids".
I know this is not exactly the operator you requested, but unfortunately there simply isn't a "Contains" operator. My example won't be dynamic and won't automatically pick up new members containing "kids".
Note: If you try out the 'Custom values' option in this dialog, and combine it with a "Between" operator you can achieve at least a dynamic "Begins with" operator. See this article: https://community.targit.com/hc/en-us/articles/360017863118-Criteria-range-with-Custom-values
BR / Ole
Hi Matteo
You could create the criteria in your Data Warehouse:
If you create a column in the table where the customer name dimensions are stored, you could do something like this perhaps? But probably depends, on whether it is something that will be used often or not.
And then create a fact table dimension for Customergroup, then you'll be able to select it as an equal to "kids" criteria in Targit.
Should you find yourself in need of creating other customer groups, you can just add more @strings and add to the case when statement like this
But it probably all depends on how many groups you'll need, and whether or not the customer can be in several groups. It is also highly likely the script can be done smarter, but that's above my limits then :)
Please sign in to leave a comment.