Imagine I have a long IF THEN ELSE formula that has Item(List member) showing up often.
Would I have a better performance if….
or
2. IF THEN ELSE was broken up
Break your nested If Else statements to multiple line items is always a better performance win.
Thank you!
What if we have a text function, let's say, FIND vs. IF statements? For example, we use FIND(line_item, "ABC", 1) eight times and also have four nested IF statements. I believe it’s best to improve your model in two steps:
In real life, I would first create the line item that repeats too many times, and then work on the IF statements. What do you think?
Additionally, what if we change the usage to FIND(line_item, "ABC", 1) ten times but reduce the nested IF statements to three, would we still prioritize simplifying the IF statements?
Regarding the trade-off between a text function like FIND() and an IF statement, how do we determine which one is less memory efficient when the number of repetitions changes?
@rob_marshall Any insight on @seymatas1? I talked to a few people and people give different answer. And only 1 can be the right answer.
@JaredDolich We need an expert help here!
@seymatas1 What an awesome hypothetical to work out. As you know, this would require knowledge about one of two methods: empirical or knowledge of how the calculation engine works. Of course, @rob_marshall knows both, but definitely the second way.
As for my limited, and probably, uninformed answer to this, I would say any text function is going to be a burden on performance. If you can perform any of this outside of Anaplan, do it and import to the data hub. But what I can tell you for sure is that you do not want to nest IF statements beyond two. Thing PLANS, think supportability and readability.
You want a real life example? Check this formula out. This unfortunately is from a real implementation I had to optimize. So, if you want the best reason not to nest IF statements, consider how you, as a new modeler to this implementation, would support something like this? Think of the emotional impact, the stress, the disparaging remarks customers make about Anaplan. What other issues do you see in this formula besides nested IF statements?
Please don't nest IF statements beyond two. And reference as often as you can - best case for system modules, and candidly, the best way to ensure top performance. Also, avoid chaining and exit IF statements based on the most likely outcome first.
@seymatas1
It really is hard work with these hypotheticals, but generally TEXT is evil and can cause performance issues. Additionally, having deep IF THE ELSE statements can be problematic as well, not only from performance issues, but as @JaredDolich stated, maintainability. I would suggest reviewing these two articles for more guidance.
Yeah this hypothetical is very difficult to figure out which one is the right answer given Anaplan resources.
Either
1) Reference system modules and calculate once
OR
2) Break up IF then ELSE and break up large formulas
is the correct answer.
Unfortunately, in an exam, this requires only 1 right answer and is not multi select, which feels like an unfair and flawed question. I wish there was a way to review and discuss unfair and vague questions….
I still do not know which is the right answer and I do not know how to be 100%. Anaplan does to give users simple calculation performance metrics, so I cannot test this myself with real data… :(
@sychtysz18
Yeah, feel free to ask me about the exam in a DM as I wrote the vast majority of it. Not sure how the exam got brought into this as the OP was just asking about text performance, but to answer your question you should calculate once, reference many times (reduces the total number calculations in the model). As for the long IF THEN statements, it is not to break them up, but to attempt early exits and do the same logic dimensionally, instead of the long statement (see what I attached above).
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.…