If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

count example

Started by a1003520, 29 Sep 2016 03:19:10 AM

Previous topic - Next topic

a1003520

could you explain how the count([column1] for [column2]) really work with an example.
Also can sum([column1] for [column2]) also work? And with example if possible

AnalyticsWithJay

Location          Employee           
US                   John
US                   Nancy
Canada            Alex

count([Employee] for report)
Result: 3

count([Employee] for [Location])
Result:
US          2
Canada   1

It's basically a count, and you specify what you want to group the count by. If you wanted to further break it down by State/Province, you could do count([Employee] for [Location],[State]).

You could use the for statement with sum, max, min, etc. They work in the exact same way. For example, if you wanted a breakdown of revenue by retailer you could total([revenue] for [retailer]).