COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: mycognosangel on 29 Sep 2016 09:06:04 AM

Title: reporting on count
Post by: mycognosangel on 29 Sep 2016 09:06:04 AM
1) Based on this table, how do I achieve the mycount value, based on EmpId and nationality count
EmpID   Nationality   Income     mycount
AAA     Finland                       7000         3
BBB     France                      9800         2
AAA     Finland                    7000         3
AAA     Finland                     7500         3
BBB     France                       9800         2


2) Based on this info, I want to generate distinct row like, by removing all duplicates (Intended output)
EmpID   Nationality   Income     mycount
AAA             Finland         7000         3
BBB              France          9800         2
AAA               Finland         7000         3
AAA               Finland         7000         3
BBB               France          9800         2

Intended output:
EmpID   Nationality   Income     mycount
AAA     Finland                  7000         1
BBB     France                   9800         1

3) Whats the use of "for" function e.g. count([columnA] for [columnB])