Previous Contributor

ITEM(Versions) : Versions is not recognized as a hierarchy in the model

Good afternoon, I recently worked with the IF ITEM(Hierarchy) = Hierachy.HierachyItem THEN ... ELSE ... to aggregate calculation modules. Currently I want to do the same for the different calculations I made regarding actuals, forecasts, budgets on bases of input files. However, when using the formula: IF ITEM(Versions) = Versions.Actual THEN ... ELSE ... I receive this error : Versions is not recognized as a hierarchy in the model , however it is added to the module, as shown below. Is there another formula specific to Versions, or does Anaplan not allow for these if functions? Thanks!

6 REPLIES 6
Regular Contributor

RE: ITEM(Versions) : Versions is not recognized as a hierarchy in the model

That's right - the ITEM() and FINDITEM() functions don't work on the Versions list. You have a few other functions that you might be able to use instead: ISCURRENTVERSION() and ISACTUALVERSION(). You can also use PREVIOUSVERSION() and NEXTVERSION() to write some logic that identifies the first and last versions in the version list. Some of that may help. Otherwise, if you really need to write custom logic depending on the version, you can get round it with an input module that's fully versioned, and using that to flag up which behaviour you want in each version. Here's one way to do this:
  • Add a module called Version-Specific Behaviour, with versions set to All
  • Put a line item in Version-Specific Behaviour called Sample Flag, formated Boolean. Don't put a formula in this line item
  • You can now say IF 'Version-specific Behaviour'.Sample Flag THEN ... ELSE ... and you just tick the sample flags in Version-Specific Behaviour for the versions you want
Previous Contributor

RE: ITEM(Versions) : Versions is not recognized as a hierarchy in the model

Thank you very much, I was able to create the desired effect by creating those input models per version type.
Previous Contributor

RE: ITEM(Versions) : Versions is not recognized as a hierarchy in the model

However, I have one more small issue, which I cannot solve. As you can see below, I have two variance versions. The second one works fine, however the difference between Actual YTD - FC2, does not work. I added the ' ' tick-up marks around FC2, otherwise I get the following error message: The formula for 'Actual YTD vs FC2' is invalid: 'Actual YTD vs FC2' = Actual YTD - FC2 Why doesn't this formula work, whilst the other works just fine? Could you please steer me into the right direction?
Regular Contributor

RE: ITEM(Versions) : Versions is not recognized as a hierarchy in the model

It works fine for me - I've just tested it. Also I can see from your screenshot that Anaplan has accepted your formula Actual YTD - 'FC2' so everything looks fine in your model too. Maybe I've misunderstood. What exactly is the problem?
Previous Contributor

RE: ITEM(Versions) : Versions is not recognized as a hierarchy in the model

[quote]Peter McAnenaIt works fine for me - I've just tested it. Also I can see from your screenshot that Anaplan has accepted your formula Actual YTD - 'FC2' so everything looks fine in your model too. Maybe I've misunderstood. What exactly is the problem? [/quote]Yes indeed, it works fine, I forgot some line items in the actuals are equal to those in the forecast.  I guess I need a break. Thank you for testing it!
Frequent Contributor

RE: ITEM(Versions) : Versions is not recognized as a hierarchy in the model

Hi there,  I guess you might have figured out the solution but just wanted to pointed out why Anaplan doesn't accept FC2 initially. I noticed that whenever there is character other than text such as numbers or special characters, Anaplan will automatically put single quote before and after the line items. However, in Versions there is no way to point and click the version when creating the formula (same goes for list property formula), so we have to be aware to put the single quote before and after the item which has number/special character in its name. I know it is pretty obvious but some of the new users might not be aware of this. Thanks, Leo