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 Community, I’m encountering an issue where an export created in Anaplan is missing column headers when retrieved via the API. However, when I manually run the same export from the Actions tab, the downloaded file includes the headers. Has anyone experienced this behavior before? I’d appreciate any insights into the root…
Hi all, I, as an Anaplan workspace administrator, am working together with a Fabric team to export data from Anaplan to Fabric via Anaplan API and Postman. We have a problem where all Anaplan exports are visible in Postman but when trying to connect to SOME of them, we get message "404, Not found". Below screenshot showing…
We are looking for Anaplan end-users to provide feedback on their experiences with the Excel add-in. Interested individuals will respond to this 5-minute survey to help us understand personal needs and behavior when using the add-in. The feedback provided by survey takers is essential to the roadmap of Anaplan's products.…