Herrozerro
Herrozerro

Reputation: 1681

SQL Server Business Intelligence Studio: Line chart from single record

I have an issue, I have a report I am building I have several columns that I would like to use in a Line chart, but I cant seem to make it work, I can sort of make it work with a bar graph but its 9 items along a single x axis. is there any way to use columns like rows in a chart?

thanks!

As requested here are some images:

Data:

enter image description here

Chart Design:

enter image description here

Chart with single axis (I would like a line graph but since there is only one row nothing shows up.)

enter image description here

Upvotes: 0

Views: 415

Answers (1)

Eric Hauenstein
Eric Hauenstein

Reputation: 2565

Ideally, your query return data should look something like this:

TestProbeDistance     Percentage
10                    90
50                    90
30                    80
20                    80
90                    30

Then your query becomes very simple, like this:

Select TestProbeDistance, Percentage
From Table

Then, your chart code should look like this (replace NCLAIMID with Testprobedistance and ID with percentage): enter image description here

The result should look like this: enter image description here

If you post your query, I can make sure that's what you need.

On edit Try this:

SELECT NUM02 as ResistanceOhms, '10PCT'
FROM audits where (formsubID=1) and (businessunit='25181001400')
UNION ALL
SELECT NUM03 as ResistanceOhms, '20PCT'
FROM audits where (formsubID=1) and (businessunit='25181001400')
UNION ALL
SELECT NUM04 as ResistanceOhms, '30PCT'
FROM audits where (formsubID=1) and (businessunit='25181001400')
...<snip>...
UNION ALL
SELECT NUM10 as ResistanceOhms, '90PCT'
FROM audits where (formsubID=1) and (businessunit='25181001400')

That should flatten it out nicely.

Upvotes: 1

Related Questions