Error message

Options

Hello,

I need help in creating a formula that divides the sales of a single week by the sales of the entire year. I am utilizing a custom calendar. When I attempt to use the SUM function, I encounter the following error message: "The name ' used in the SUM clause is not recognized as a line item in the model."

I have attached an image for further clarification. Thank you in advance.

Answers

  • Can you send error screenshot

  • AlejandroGomez
    edited August 2023
    Options

    hi @SAtrane

    assuming as you say that you are using Anaplan's custom calendar in the time dimension, you can use a few approaches to get the total year value:

    1. as used in the Anaplan Level 1 model builder training, you can use the function YEARVALUE to retrieve the total value for the year where each week belong to
    2. alternativelly, you can create a new Line Item formatted as Time Period - Year and use the function PARENT(ITEM) or PARENT(PARENT(item)) to retrieve the year. Then use Sales[Lookup: Line item with the parent year] to retrieve the total year value. The good thing about this second approach is that it also works when you are using dummy time dimension (a regular list or hierarchy).

    Please, let me know if it worked.

    Cheers

    Alex

    PS: the error message you are getting is most likely produced because you are not using a line item in your SUM formula. Probably you are attempting to do something like this: Sales[SUM: year 2023] whereas in the SUM function you can only reference to a line item, not to a list item of your time dimension. And that is what Anaplan is trying to tell you with that error message.

  • I tried your way and it worked.