Can I make a timechart on a query?

LabKey Support Forum (Inactive)
Can I make a timechart on a query? jdutra  2013-10-25 08:35
Status: Closed
 
The instructions for creating a timechart in the help start with:

 - Navigate to the dataset, view, or query of interest.

In 13.1, when I try to make a timechart based on a query, the "Add Measure" window says no results were found for the the current filter, even though some of the columns of my query have been marked as measures, and work as measures in other types of charts. The heading of the first column on this window is "Dataset", which I'm assuming means I may not be able to do this with a query.

In 13.2, I try the same thing and get the same result. The heading of the first column in 13.2 has been changed to "Dataset/Query", but the behavior hasn't changed.

Is it possible in either version to make timecharts based on a query? If so, what am I doing wrong? If not, do you plan to make this feature available in a future version?

Thanks for any suggestions!
Jen
 
 
cnathe responded:  2013-10-25 09:18
Jen,
Yes, it is possible to create a time chart using measures from a Query. However, since the time chart is study specific, it will only show measures from queries that contain the required fields: ParticipantId and ParticipantVisit. There is some help text briefly describing this requirement in the "Add Measure..." dialog from the Time Chart.

So, if for example I was writing a query in the LabKey demo study using the "Physical Exam" dataset, I would make sure to include the following two fields in my SQL:

SELECT "Physical Exam".ParticipantId,
"Physical Exam".ParticipantVisit,
...
FROM "Physical Exam"

Let me know if that doesn't work for you.
Thanks,
Cory
 
jdutra responded:  2013-10-25 10:10
Thank you so much Cory! That was exactly what I needed. I'm sorry I didn't notice it in the help.

Thanks again,
Jen