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.
Hello, I’m running into a recurring issue when importing CSV files into Anaplan, specifically with dates in February for the years 2028, 2029, and beyond. Here’s what’s happening: In Excel, the date format is set to Custom (e.g., 2/26/2025). When imported into Anaplan, the date is interpreted as 26-Feb, where: Month = Feb…
I have an issue where I am getting the expected result from RANKCUMULATE when using one dimension, but when I add an additional scenario dimension to the module, it doesn't calculate the way I'd expect. Here are some screenshots to explain the case: Module 1 - calculates cumulative total for list items in list "Age"…
Hey everyone, I wanted to share the Anaplan Python SDK with you. It's a Python Library that wraps all Anaplan APIs and makes it easier to interact with Anaplan programmatically. It is mostly designed with Data Integration Scenarios in mind, but it does support all APIs including ALM, SCIM, Audit, and Cloud Works. Please…