Swap rows and columns for charting

In order to trend data in FPMI, I need each tag to be represented in a column and the rows delineated by date. My data is returned in one big column. How can I swap the rows for columns?

You can transpose the data with clever SQL queries, but you probably shouldn’t need to. With the FactoryPMI Easy Chart component you define pens (each pen stores the: timeStamp, column name, table name, etc). In your case each pen will basically be the same, but you’ll use the WHERE clause of the pen to filter for the data that each series is looking for.

Suppose you have a table with 3 columns
t_stamp stores the date/time the data was logged
tagNamedescribes which tag you’re logging
value holds the actual value.

You would create 2 pens that both point to the same table, column, timestamp, etc, and simply add
WHERE tagName=‘temp1’ for the temp1 pen
WHERE tagName=‘temp2’ for the temp2 pen

Does this answer your question?