Link to home
Start Free TrialLog in
Avatar of tcottrill
tcottrill

asked on

Showing all values in a cell in a matrix in SQL Server 2005

Here's my deal. I've got a pretty simple matrix set up that is pulling data from a reasonably complex query. The end result is a matrix that looks something like this

                        Date
                       ______
Keywords      | ranking

For the Most part, it's working great.

The problem is that the ranking field is currently only displaying the top value, while it could have multiple values. I don't want to do a sum or any kind of aggregation. Ideally, I'd just want a comma seperated list or running list of the values.

For example, if a person ranks for an term in two places in a month, I'd like it to display "1, 17" rather than just 1....

Any and all help is greatly appreciated.
Avatar of Chris Luttrell
Chris Luttrell
Flag of United States of America image

I just did something similar but stacked the inner values vertically using a table inside a matrix.  See https://www.experts-exchange.com/questions/24331492/Can-I-display-a-list-of-data-within-a-single-cell-of-an-SSRS-Matrix-based-on-the-row-and-column-values.html and see if that kind of solution  could work for you.  I have been trying to do a matrix in side a matrix to stack them horizontally but with no real success.
The other option is to play with the query from the database and turn that column into a comma separated string.  Let me know if you need to go that route, I have an XML trick to do that.
Avatar of tcottrill
tcottrill

ASKER

Thank you. Your solution is very workable, and might work in a pinch.

I'd love to see your XML trick
ASKER CERTIFIED SOLUTION
Avatar of Chris Luttrell
Chris Luttrell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial