topic Count Function in Anaplan Platform https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/1395#M2440

Hi,  I have a line item 'country' based on which my account module is developed. These accounts are mapped to countries. I need to find out the count of accounts from each country. In the sample below, there are 5 US accounts, 2 Canada and so on. How to come up with the count of UNIQUE accounts based on each country? for the below example I want to find out only Account 1, Account 2 and Account 3 for US country . So for US the Accounts count should be 3.

Accounts Country
Account 1 US
Account 2 US
Account 3 US
Account 1 US
Account 1 US
Account 6 Canada
Account 7 Canada
Account 8 Mexico
Account 9 Mexico
Account 10 Mexico
Thu, 01 Nov 2018 01:10:46 GMT PrevContributor 2018-11-01T01:10:46Z Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/1395#M2440

Hi,  I have a line item 'country' based on which my account module is developed. These accounts are mapped to countries. I need to find out the count of accounts from each country. In the sample below, there are 5 US accounts, 2 Canada and so on. How to come up with the count of UNIQUE accounts based on each country? for the below example I want to find out only Account 1, Account 2 and Account 3 for US country . So for US the Accounts count should be 3.

Accounts Country
Account 1 US
Account 2 US
Account 3 US
Account 1 US
Account 1 US
Account 6 Canada
Account 7 Canada
Account 8 Mexico
Account 9 Mexico
Account 10 Mexico
Thu, 01 Nov 2018 01:10:46 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/1395#M2440 PrevContributor 2018-11-01T01:10:46Z
RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/1396#M2441 Hi Subhayan, One option is using the average function to calculate the unique count of accounts by country (see attached screenshot). In the first module, I've assigned a value of 1 to each account/ country combination. In a seperate module, I've taken the average to help determine the number of unique counts. You can substitue average with the sum funciton if you need the total of each combination.  Sat, 28 May 2016 04:44:56 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/1396#M2441 pierre_kerkinni 2016-05-28T04:44:56Z Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41964#M4450

Hi,

 

I have a similar requirement.

 

employee.PNG


employee 2.PNG

Based on position,Dept,Employee Type & Location combination report shows the employees list. Here, I want to view the those employees count.

 

By using the formula from the above reply, i write formula as per my requirement.

 

But the formula was invalid because 'average' formula supports other than " list&Date " format. 

employee 3.PNGemployee 4.PNG

But as per my requirement "position" line item format is List.

 

Please suggest me how to resolve the above requirement?

 

Can you please suggest me?

 

Regards,

Uma

Mon, 04 Mar 2019 16:08:22 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41964#M4450 UMAMAHESH 2019-03-04T16:08:22Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41966#M4452

 

the best option will be to have a numeric line item within the employee details module with the formula 1

Then you can use that to count and average

If you need to count the number of owners, managers, create a module by Position and sum the headcount value into that module

Hope that helps

David

Mon, 04 Mar 2019 16:15:55 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41966#M4452 DavidSmith 2019-03-04T16:15:55Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41967#M4453

Hi Uma,

 

In Employee Module, Create 1 line ltem(Number format)

 

Use this Logic, 

 

If filter=true then 1 else 0

 

Then take the Top level(Total) of Employee value is your Filter Count.

 

I have a Question,

Why do you need Position Dimesnion in your Employee module, when you already have position infomration in lIne item itslef.

 

~Vignesh

Mon, 04 Mar 2019 16:26:35 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41967#M4453 VIGNESH.M 2019-03-04T16:26:35Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41975#M4456 < P >嗨Vignesh, < / P > < P >, < / P > < P >我用假定ion dimension in employee module because we need minimum one dimension in page selector of employee module. if not filter is not applying, i dont know why its happening?

 

In page selector i didnt maintain  any dimension then filter  is disabled

11111.PNG

 

When i maintain any one dimension in page selector then Filter is enabled.

22222.PNG

Thats why i am using position dimension in employee module.

 

I am sorry I dont whether it is a correct practice or not.

 

Regards,

Uma

Mon, 04 Mar 2019 17:40:16 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41975#M4456 UMAMAHESH 2019-03-04T17:40:16Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41976#M4457

 

Did you follow my set up method from the other post

 

You should not need the position dimension in the employee details module

 

David

Mon, 04 Mar 2019 17:42:08 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41976#M4457 DavidSmith 2019-03-04T17:42:08Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41977#M4458

Hi Uma,

 

Its not like you need dimension to apply filter.

Remove the Position Dimension and Clear all filter, then reapply the filter.

 

~Vignesh

Mon, 04 Mar 2019 17:49:52 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41977#M4458 VIGNESH.M 2019-03-04T17:49:52Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41978#M4459

Hi vignesh,

 

Yes, its working fine.

 

Thank you so much.

 

Regards,

Uma

Mon, 04 Mar 2019 17:54:13 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41978#M4459 UMAMAHESH 2019-03-04T17:54:13Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41979#M4460 < P >你好大卫,< / P > < P >, < / P > < P >感谢您reply.

 

Its working fine.

 

Regards,

Uma

Mon, 04 Mar 2019 17:57:44 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/41979#M4460 UMAMAHESH 2019-03-04T17:57:44Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79409#M16971

Hi, 

 

Just to add, lets say I have a account which is appearing in both countries - US & Canada(Module 1). Using the Count function - I have identified the account which is appearing multiple times (Module 2). But, how to mark the account(Account 4) in module 1 using module 2 findings - I can create a new line item (Boolean) in module 1, but I'm unable to identify the correct formula to fetch the details from Module 2 to 1

 

AccountsCountry
Account 1US
Account 2US
Account 3US
Account 4US
Account 5US
Account 6Canada
Account 4Canada
Account 8Mexico
Account 9Mexico
Account 10Mexico

 

Thanks

AB

Wed, 05 Aug 2020 15:55:09 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79409#M16971 CommunityMember111277 2020-08-05T15:55:09Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79426#M16972

 ,

 

One way to do it is to use RANK function. In this example 'Account occurrence' line item shows number 1 if account occurs more than once. 

Then conditional formatting is used in Accounts line item. This doesn't mark the first occurrence of account, but all other (second, third,...). 

JussiLi_0-1596647045953.png

Regards,

JussiLi

Wed, 05 Aug 2020 17:10:04 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79426#M16972 JussiLi 2020-08-05T17:10:04Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79435#M16975 Hi JussiLi,

Thanks for the suggestions.. Really appreciate it.
In this case, Account-4(Canada) is getting highlighted under "Account occurrence". However, if I need to highlight both Account-4 Canada & US under "Account Occurrence"- then what is the solution?

Thanks
AB
Wed, 05 Aug 2020 18:09:58 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79435#M16975 CommunityMember111277 2020-08-05T18:09:58Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79437#M16977 no worries.. I got the formula.. we can use MAXIMUM instead of SEQUENTIAL

Thanks
Wed, 05 Aug 2020 18:15:00 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79437#M16977 CommunityMember111277 2020-08-05T18:15:00Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79442#M16980

 , 

I would use separate module which stores the number of accounts data: 

JussiLi_0-1596651599795.png

and bring account count data back to main module and use it in conditional formatting: 

JussiLi_1-1596651718798.png

It is possible to replace separate 'Account count' module with a line item which has Accounts as a dimension and use same IF statement there. But it is best practice to avoid subsidiary views. 

 

Regards,

JussiLi

Wed, 05 Aug 2020 18:29:48 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79442#M16980 JussiLi 2020-08-05T18:29:48Z
Re: RE: Count Function https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79444#M16981 Thanks.. It worked.. BIG KUDOS to you. Wed, 05 Aug 2020 18:42:42 GMT https://community.anaplan.com/t5/Anaplan-Platform/Count-Function/m-p/79444#M16981 CommunityMember111277 2020-08-05T18:42:42Z