Hi,
I have a line item where I need to remove all those before the dash (-). Is there a way to do this?
Thanks!
@Ana22
MID() and FIND() formulas will help here:
expected = MID(current,FIND("-", current)+1,<n>)
where <n> - max number of characters thich may appear after the dash sign.
While the solution provided by @KirillKuznetsov certainly works to meet the requirement, it's also important to recognize that text parsing functions and text line items in general are prone to sub-optimal performance. The Planual advises against using text as much as possible (see rules 2.02-04 and 2.03-02).
My guess based on the data format is that the data is coming from an external system. If possible, try to parse these values out upstream or in the ELT layer before it gets into Anaplan, as that will allow Anaplan to perform optimally.
However, if that is not possible, I have an alternate approach that will perform better, especially if the data set you are importing is sizable.
In order to improve performance here, you can take advantage of a subtlety about the way that alphanumeric fields are imported into Anaplan when importing them into a Number-formatted line item. There was actually a recent post on Community about this.
For the examples below, I will make the assumption that you want your final output to be Number formatted. Let's compare performance between the two options.
Option 1: text manipulation
Import the value as text, and use FIND, MID, and VALUE to get the final result.
Blueprint:
Grid view:
Option 2: alphanumeric import as a Number
Import as number (value will come in as -123 due to the subtlety mentioned above), and use ABS() to convert the value to positive. You could also do value*(-1), but I'm choosing ABS() here as an extra safeguard against values that may be missing a hyphen.
Performance Comparison
I set up a test model that did not have any additional calculations based on the final result, and I mocked up a data set of 1M items in a csv file, using the same file for both examples above.
Using a simple stopwatch test:
Option 1: 9s
Option 2: 7s
So even in this simple test, we can see that the import will run faster in the second case, even though the import file and final result are the exact same. Note further that as you build more downstream logic on these constructs, performance issues can compound further, so we want to be very careful with text. Text will always be slower, so we should try to avoid it wherever we can, and in this case we can!
Hi! Could you help me essentially find the reverse of this? Basically I want to find everything to the Left of the dash.
Hi everyone, I'm trying to use this function on specific members of my grid, as described in the documentation. In my example, the grid contains two row elements: ACTIF and PASSIF. The problem is that when I use this function, it affects all elements in the grid, whereas I only want it to apply to the specified member:…
Hi, Where are the member properties for lists defined in Anaplan XL? In the training documentation there is an example showing a property such as “Birth Date”, which appears to be a list-item attribute. That suggests you can create custom list properties from the Anaplan list. However, when I connect through Anaplan XL, I…
Hi all I have a list of networks organized hierarchically on a list of entities, which is itself organized hierarchically on a list of divisions (organization). An entity can have several networks. I also have a list of product models, which is itself ranked with three higher levels: this “Models” L4 list is ranked at a…