Counting a Project name

I am counting the project item(List: Project name) based and generating a unique number by adding +1 to count . everything is working fine until a situation comes where i have to delete some existing projects.

  1. When i delete the project → my count reduces and the way i am creating a unique number which is by +1 to my count (is giving me wrong answers)
    1. What should i do so that my count doesnt get affected even if i delete my project item.

Answers

  • @Gpatwa

    There are multiple ways to resolve this.

    1) You can try to store the last code generated in a separate line item (no dimensions)

    2) use the cumulate formula for your counter CUMULATE(1, FALSE, Project name)

    3) Take the maximum code number (using the Summary method: Max) and add 1 to it each time you want to create a new item.

  • Dikshant
    edited May 6

    @Gpatwa - Project list is a numbered list? If so, it is best to use hash code as project code.

    If it's flat list, add a top item, and then use the last non blank summary method or last non blank function OR MAX function / summary to get the last generated code in the list, and then increment it, rather than counting the number of projects and the doing an increment.