Count Function?

Highlighted
Previous Contributor

Count Function?

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 accounts based on each country?

Accounts Country
Account 1 US
Account 2 US
Account 3 US
Account 4 US
Account 5 US
Account 6 Canada
Account 7 Canada
Account 8 Mexico
Account 9 Mexico
Account 10 Mexico
1 REPLY 1
Highlighted
Previous Contributor

RE: Count Function?

Hi - One way to do this is to...
  • Have a line item in the account module named 'Counter', and give it a formula of 1.  So you basically get the number 1 against every account
  • Now create another module which has Country as a dimension. In that module have a line item named 'Number of Accounts', and enter the formula Account Module.Counter[SUM: Account Module.Country]
Hope that helps. Regards