Reports - Showing data in a table


I have been struggling to create a report for a while now and what I'm trying to do seems simple, so I figured I would finally reach out for some help. I have 5 historian tags I want to display the data for. The tags are boolean tags that go true every once in a while, I want to report on how much time the boolean tags are true over a given time. I want to display the data in 3 ways.

  1. I want to display it on a pie chart, I was able to get this working as intended.
  2. I want to display it on a bar chart, where each tag has it's own bar, so for example, tag1 has a duration of 300 seconds, while tag2 has a duration of 36 seconds. The bar chart should have one bar per tag.
  3. I want to display the data on a table as well, just a basic table with 2 columns. Name, and duration.

In my attempts to do this, I have been unsuccessful. Here's the data I am working with:

	<!--This is the raw data used to create the report preview.-->
	<EndDate>2023-07-17 11:50:54.197</EndDate>
		<Timestamp>2023-07-17 11:50:54.197</Timestamp>
	<StartDate>2023-07-17 03:50:54.197</StartDate>
			<t_stamp>2023-07-17 03:50:54.197</t_stamp>
			<t_stamp>2023-07-17 03:50:54.197</t_stamp>
			<t_stamp>2023-07-17 03:50:54.197</t_stamp>
			<t_stamp>2023-07-17 03:50:54.197</t_stamp>
			<t_stamp>2023-07-17 03:50:54.197</t_stamp>

If someone could please help me to accomplish this I would appreciate it.

Take a look at the User Manual

Especially the first paragraph

A Bar Chart typically contains a single string column that gets used as the Domain with as many other columns representing the Range axis values. The order of the dataset matters, and the string values used for the domain should be in the first column of the dataset.

You want tagpath to be your domain but you have t_stamp in the first column.

1 Like

Thanks Tim,

Do you know how I can get rid of the t_stamp data entirely? I'm using a Tag Calculation Query and I don't see any option to not include the timestamp.

You need to add a new data source of type Script. Add it after your tag_calc source. In the script create a new data source that contains only the two columns you want.

See "Python - Building a New Data Source" near the bottom of this page:

1 Like

Thank you, this is super helpful. I have the bar chart working now, and now I understand how I can manipulate the data to fit each component on the report.

1 Like