# Reports - Showing data in a table

**URL:** <https://forum.inductiveautomation.com/t/reports-showing-data-in-a-table/76464>\
**Category:** Ignition\
**Created:** [July 17, 2023, 3:52pm UTC](https://forum.inductiveautomation.com/t/reports-showing-data-in-a-table/76464 "2023-07-17T15:52:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bronzebeard62](https://avatars.discourse-cdn.com/v4/letter/b/838e76/32.png) [@Bronzebeard62](https://forum.inductiveautomation.com/u/Bronzebeard62)\
**Post date:** [July 17, 2023, 3:52pm UTC](https://forum.inductiveautomation.com/t/reports-showing-data-in-a-table/76464/1 "2023-07-17T15:52:46Z")

</div>

Hello,

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:

```auto
<sample-data>
	<!--This is the raw data used to create the report preview.-->
	<EndDate>2023-07-17 11:50:54.197</EndDate>
	<Report>
		<Gateway>RedactedGatewayName</Gateway>
		<Name>Report</Name>
		<Path>Report</Path>
		<Timestamp>2023-07-17 11:50:54.197</Timestamp>
	</Report>
	<StartDate>2023-07-17 03:50:54.197</StartDate>
	<tag_calcs>
		<row-0>
			<t_stamp>2023-07-17 03:50:54.197</t_stamp>
			<tagpath>Tag1</tagpath>
			<DurationOn>843</DurationOn>
		</row-0>
		<row-1>
			<t_stamp>2023-07-17 03:50:54.197</t_stamp>
			<tagpath>Tag2</tagpath>
			<DurationOn>75</DurationOn>
		</row-1>
		<row-2>
			<t_stamp>2023-07-17 03:50:54.197</t_stamp>
			<tagpath>Tag3</tagpath>
			<DurationOn>0</DurationOn>
		</row-2>
		<row-3>
			<t_stamp>2023-07-17 03:50:54.197</t_stamp>
			<tagpath>Tag4</tagpath>
			<DurationOn>722</DurationOn>
		</row-3>
		<row-4>
			<t_stamp>2023-07-17 03:50:54.197</t_stamp>
			<tagpath>Tag5</tagpath>
			<DurationOn>303</DurationOn>
		</row-4>
	</tag_calcs>
</sample-data>

```

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

---

<div class="post-metadata">

**Author:** ![Tim\_Carlton](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_carlton/32/52835_2.png) [@Tim\_Carlton](https://forum.inductiveautomation.com/u/Tim_Carlton)\
**Post date:** [July 17, 2023, 4:24pm UTC](https://forum.inductiveautomation.com/t/reports-showing-data-in-a-table/76464/2 "2023-07-17T16:24:15Z")

</div>

Take a look at the User Manual  
[https://docs.inductiveautomation.com/display/DOC81/Report+-+Bar+Chart](https://docs.inductiveautomation.com/display/DOC81/Report+-+Bar+Chart)

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.

---

<div class="post-metadata">

**Author:** ![Bronzebeard62](https://avatars.discourse-cdn.com/v4/letter/b/838e76/32.png) [@Bronzebeard62](https://forum.inductiveautomation.com/u/Bronzebeard62)\
**Post date:** [July 17, 2023, 4:33pm UTC](https://forum.inductiveautomation.com/t/reports-showing-data-in-a-table/76464/3 "2023-07-17T16:33:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tim\_Carlton](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim_carlton/32/52835_2.png) [@Tim\_Carlton](https://forum.inductiveautomation.com/u/Tim_Carlton)\
**Post date:** [July 17, 2023, 5:13pm UTC](https://forum.inductiveautomation.com/t/reports-showing-data-in-a-table/76464/4 "2023-07-17T17:13:03Z")

</div>

> [@Bronzebeard62](#):
>
> Do you know how I can get rid of the t\_stamp data entirely?

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:  
[https://docs.inductiveautomation.com/display/DOC81/Scripting+Data+Source](https://docs.inductiveautomation.com/display/DOC81/Scripting+Data+Source)

---

<div class="post-metadata">

**Author:** ![Bronzebeard62](https://avatars.discourse-cdn.com/v4/letter/b/838e76/32.png) [@Bronzebeard62](https://forum.inductiveautomation.com/u/Bronzebeard62)\
**Post date:** [July 17, 2023, 5:34pm UTC](https://forum.inductiveautomation.com/t/reports-showing-data-in-a-table/76464/5 "2023-07-17T17:34:34Z")

</div>

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.
