Will
Will

Reputation: 234

SSRS - number of values against a certain column

I have a table showing two fields:

Location      Status

Location1     Current 
Location2     Current
Location3     Not Active
Location4     Not Active
Location5     Current

I would like to add a seperate table in my report to sumarise the data:

Status    Number of Partners

Current           3
Not Active        2

Is this possible within Visual Studio or should i think about doing it in SQL (it would be easier but just intruiged).

Thanks for your help in advance.

Upvotes: 0

Views: 29

Answers (2)

Amrita Srivastava
Amrita Srivastava

Reputation: 384

yes you can create a separate table... but its can be done within the same table by just adding a group by query as...

    select status, count(status) from table t group by status;

Upvotes: 1

Yogesh Sharma
Yogesh Sharma

Reputation: 50163

Why the separate table ? you can do :

select status, count(*)
fro table t
group by status;

Upvotes: 0

Related Questions