Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Count data in column.

Author  Topic 

jamie_pattison
Yak Posting Veteran

65 Posts

Posted - 2008-08-22 : 11:17:31
I have data in a report in the following format:

Name
Position
Title


Data returned is

Name Position Title
DJ Quik Artist Mr
Madonna Singer Mrs
Michael Jackson Singer Mr
Kylie Minogue Singer Miss

I would like to return data at the end of this report to say something like:

Mr = 2
Mrs = 1
Miss = 1

So im after the count of all possible data found in Title. Ive tried using some expressions (right clicking a textbox) but none work.

Any advice?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-22 : 13:20:09
Yup. just put the expression below in table footer
="Mr = " & Cstr(Sum(IIF(Fields!Title.value="Mr",1,0))) & vbCrlf &
"Mrs = " & Cstr(Sum(IIF(Fields!Title.value="Mrs",1,0))) & vbCrlf &
"Miss = " & Cstr(Sum(IIF(Fields!Title.value="Miss",1,0)))
Go to Top of Page
   

- Advertisement -