You can help by commenting or suggesting your edit directly into the transcript. We'll review any changes before posting them. All comments are completely anonymous. For any comments that need a reply, consider emailing training@inductiveautomation.com.
Version:
LESSON LIST
-
5:37Timeseries Chart
-
3:03XY Chart
-
3:26Bar Chart
-
3:59Pie Chart
-
3:16Simple Table
-
3:22CrossTab Table
Take Topic Challenge
LESSON
CrossTab Table
Description
The CrossTab Table component allows you to show groupings in a matrix based on two keys. You can easily create a visualization of interactions between multiple keys.
Video recorded using: Ignition 8.1
Resources
Transcript
(open in window)[00:00] The crosstab table allows you to very quickly show cross sections of data where the other table types are focused on a dynamic number of rows and columns. I'll drag one into my report from the components section to review how it works. I'll also resize this initial matrix of cells using the arrow handles, just so it's a bit easier to see everything. Just like the other chart components, we need to set the data key. So I'll drag in my Downtime_By_Site data source to this key. I'll switch over to the data tab so we can review that dataset. We can see Downtime_By_Site is a static CSV with three columns showing equipment, time in minutes and site. Now I want the crosstab to show you a count between the number of downtime events for each piece of equipment and each site. I have four different sites, site A, B, C, and D, and the four pieces of equipment we've used before In the simple table video. Let's go back to the design tab and select the table to configure it.
[01:02] First, we'll click and drag the equipment key and drop it on the top row here. Then we'll grab site and place it in the first column. Lastly, we'll grab count and put it in the remaining cell. What this configuration is going to do is give us a count based off the equipment and the site of each row in our data source. If we take a look in the preview tab, you'll see each piece of equipment and each site. Now, let's compare this to the raw data. For example, our motor has two occurrences at site A. If we take a look at the data tab, we'll see we have two rows with motor and site A. Let's add another key to our table. We'll go back to the design tab and select the table. With our table selected, we could add in a new row by directly altering the rows property like we saw in the simple table video. This, however, can be accomplished using a cell function. So if I click into one of these cells in the bottom row, let's say count and right click, you'll see I have a number of available functions that we can perform. In this case, I would want to choose the add row below function.
[02:04] This new row is a bit smaller than the others, so I'll drag it down by first clicking on this divider line and then dragging my mouse down. For our new section, I would like to look at the total time per piece of equipment. In the key browser we'll go ahead and expand our time key. Then we'll drag in our total time to this bottom right cell. Now, in this remaining empty cell, I'm not going to place another key. Rather, I'm going to provide a text label of total time. You can do this by simply clicking on the cell and then typing the text you want. If we take a look at the preview tab, you'll see we have this total time row now. Now this is only looking at the total time per piece of equipment. It's not grouping up against a site. It's only grouping against a single key, which is equipment in this case. We can go ahead and make sure that this is doing what we think it is. If we look at the total downtime of our palletizer, we can see it was down for a total of 90 minutes. When we switch back to our data tab, you'll see a total of three downtime occurrences.
[03:02] For our palletizer, the sum of our downtime of 40, 30, and 20 would equal our total downtime of 90 minutes. So while the crosstab table does very quickly show cross relationships of data, it is also great at showing the aggregation of repetitious data.