I have 3 columns (DateTime, GroupName, Value), some of these groups are closely related and I would like to display these in a stacked graph. The problem I am facing (I THINK) is that I don't have entries for all groups at all times.
(cannot find a decent way to add a table, so here is some code)
Datetime Groupname Value
1 a whatever
1 b whatever
1 c whatever
2 a whatever
2 b whatever
3 a whatever
3 b whatever
3 c whatever
4 b whatever
So in the example I don't have an entry for C at time 2. And I also don't have an entry for A and B at time 4.
Resulting in: edit: added to onedrive link
With my limited SQL skills I am not sure how to fix this. How do I get the graph to connect the points from the DateTime points where we do have data, and ignore DateTime points where we do not have data?
11-07-2016 Edit
Ok, so here some pictures of the actual data
No rep - Onedrive it is https://1drv.ms/f/s!AhKMFQBAmZ7GgYEMzdpTBvuXTi5gAQ
the graph looks different than my first example because I set the X-axis to scalar.
On 7/5/2016 and 7/6/2016 (month/day/year notation) the CH3 is low and 0. If I remove CH3 from results the graph looks ok.
@sqlandmore.com This is the query. Very basic. Data is coming from a database were the datetime is not in a proper datetime format so thats gets converted into the wimsview.
SELECT
WimsView.TagID
,WimsView.SampleDateTime
,WimsView.SampleValue
,WimsView.TagName
FROM
WimsView
WHERE
WimsView.SampleDateTime > N'07/4/2016 00:00:00'
AND ((WimsView.TagName LIKE N'%MBA%') OR (WimsView.TagName LIKE N'%MBB%') OR (WimsView.TagName LIKE N'%GF1_DPC%')OR (WimsView.TagName LIKE N'%KF1_DPC%')OR (WimsView.TagName LIKE N'%CH3_DPC%'))
AND WimsView.SampleValue IS NOT NULL