Anaplan count function

sanjib
edited December 2022 in Modeling

Hello Anaplan Community,

 

I am stuck in counting the items in a line item.

I have a line item called 'Status' and it is List formatted.

Screenshot (57).pngScreenshot (54).pngScreenshot (55).png

Now I want to count the number of Particular items in the   line items. Like 'Completed' occurs four times, so it should count completed as 4.Like wise 'In Progress' occurred four times, so it should give me count of 4.

All the count I need in a separate module called 'Count of Status'.

Screenshot (56).png

 

How can I proceed? Please help me with the formula or way to do this task.

 

Thanks in advance

Sanjib

Tagged:

Best Answers

  • nikmg
    edited December 2022 Answer ✓

    Hello,

     

    You can use the SUM function to execute this.

     

    1. Create a Count line item [number formatted] in the "Inp - Task 1" module.

    2. Hardcode the formula "1".

    3. In the "Count of Status" module, write this formula:  Inp - Task 1.Count[Sum: Inp - Task 1.Status]. 

     

    Ex:

    nikmg_0-1671092879594.png

     

    nikmg_1-1671092903456.png

     

     

  • nikmg
    edited December 2022 Answer ✓

    HI @sanjib ,

     

    You will just need to append another sum over the "Owner" column to the same formula.

    Your new formula would be Inp - Task 1.Count[SUM: Inp - Task 1.Status, SUM:Inp - Task 1.Owner]. 

     

    Best,

    Nik

Answers

  • sanjib
    edited December 2022

    Thanks a lot,

     

    I was able to do the task.

    Here is the solution SC-

    Screenshot (61).png

    Now I need another help.

     

    In 'Inp-Task 1' module, I have a line item "Owner-(List formatted).

     

    sanjib_0-1671095723881.png

     

    I need to count the Status according to Owner. Like Sanjib has one Reopen Status and one In Progress Status. So in the new module "Count of Status by Team Mate", it should show me the count as Reopen 1 and In Progress 1 and other task 0. Like wise for other owner also.

    Screenshot (64).png

    Thanks in adv

  • sanjib
    edited December 2022
    Thanks @nikmg
  • sanjib
    edited December 2022

    Hi @nikmg 

    Can you please help me to solve this problem.

    I have a module name 'INP-Task'. 

    Screenshot (72).png

    I have another module name 'Out- Task', in where the only task associated to user should be shown.(I have given selective access to user list)

    Screenshot (74).png

    Like Sanjib is the owner of TAS08 in 'INP-Task', so in 'Out-Task', only 'TAS08' should be shown.

    Hope you understand my problem.

     

    Thanks

  • nikmg
    edited December 2022

    HI @sanjib ,

     

    I would recommend creating a separate post for different topics as it helps people filter and find them easily.

     

    Now about the issue at hand, you could use the function TEXTLIST, but that is a highly performance inhibitive function and its usage is against Anaplan best practices.

    An alternative that @rob_marshall has recommended in the past is to utilize Booleans and ANY function to achieve similar results.

    Here is how you can implement it:

    In your INP-Task module, create a Boolean flag as below [Formula =TRUE]

    nikmg_0-1671787505768.png

    Now create a mapping module dimensioned by both the Users list and the Tasks list. Fetch this Boolean flag into this new mapping module via ANY function.

     

    nikmg_1-1671787579094.png

    In the same mapping module, create another line item [Format: Tasks List] and write a formulas to get the task names for relevant intersections. Summary of this line item should be either firstnonblank or lastnonblank, both works. See blueprint view of the mapping module below

     

    nikmg_2-1671787727519.png

    Finally, in your 'Out-Task' module, you can directly reference the 'Get Task Name' line item from the mapping module. You have your result as below.

     

    nikmg_3-1671787816026.png

    Hope that helps!

     

    Best,

    Nikhil

  • Hello @nikmg 

     

    Thanks for your help, I was able to do that.

     

    Now I want to insert the line item information of 'INP-Task' like Backup, Priority, Start Date, End Date, Due Date associated with the user task in the module 'Your Task'.

    Your Task ModuleYour Task Module

     

    Your Task Module Blueprint view

    Screenshot (78).png

    INP Task module

    Screenshot (77).png

     

    Thanks