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 2008 Forums
 Analysis Server and Reporting Services (2008)
 summary of table values

Author  Topic 

dmaxj
Posting Yak Master

174 Posts

Posted - 2011-01-18 : 16:44:13
I have table with 80 columns. Each of the columns contain values from 1-5. Is there a way to output the count of each value for each column?

Something like:

Q1 1 - 4
Q1 2 - 7
Q1 3 - 1
Q1 4 - 10
Q1 5 - 6

Q2 1 - 3
Q2 2 - 0
Q3 3 - 8
Q4 4 - 5
Q5 5 - 2

And so on for the remaining columns...

Regards

dmaxj
Posting Yak Master

174 Posts

Posted - 2011-01-18 : 17:35:26
so I have been using:

SELECT Q1, COUNT(Q1)
FROM tableName
GROUP BY Q1
GO

SELECT Q2, COUNT(Q2)
FROM tableName
GROUP BY Q2
GO


I would have to repeat this query 78 more times. Is there a better way to get desired result other than 80 queries?

Regards
Go to Top of Page

dmaxj
Posting Yak Master

174 Posts

Posted - 2011-01-19 : 09:25:43
So, I have made some progress with Analysis Services. I managed to make a data source and a data source view for my sql server table. I also found something close to what I could use by right-clicking the background and choosing 'Explore Data' -

Then I have the choice to choose from Chart. I can then see bar graphs with a count for the columns- this is PERFECT, but I cannot print or export the graphs.

IS there a way to print or export the graphs - please help.

Thank you in advance.
Go to Top of Page
   

- Advertisement -