Jump to content

Table / Scorecard Metric - create an average in last row


Recommended Posts

Hello everybody,

I have the following question:

I am building an organizer topic, where I display averages per months of different phases of this year: 

image.png.96fc40629c98c5e70041df388f2bd112.png

I did this with the scorecard metric and it worked very well. However, I would like to display the average of each of these columns (phases) of the complete year in the last row below Dez.22. How can I do that? Ofc. I know how to calculate the average of the phases (columns) per year but how to display them the way I described above.

Any Ideas? Thank you very much.

Regards Matthias

Link to comment
Share on other sites

  • Seeq Team

Hi Matthias,

There are a few ways you could display the average of each of these columns in the manner you describe.

The first option is to calculate the average of the columns per year and display them in a separate scorecard with only one row. Then bring these two tables together in an organizer topic for the final display. Below is an example of what this could look like (using days instead of months and a week instead of a year):

image.png

Tip: By inserting the table as interactive (in versions R54+) the table will render more clearly and the columns will line up. 

 

Another option is to create a condition for years and then combine this yearly condition with your monthly condition using the combineWith() formula function. This will create a condition with both the monthly capsules used for your averages, and a yearly capsule. By using this condition in your scorecard metric, you will get a row for each month, as well as a row for the year.

A few things to note with this approach. First, the row for the year will appear at the top of your table instead of at the bottom because it is ordered on capsule start time, not capsule end time. In fact, you may want to delay your monthly condition by 1 second to ensure that the yearly condition shows as the first row. Second, the average result you will see for the year will be an average of all the samples in the input signal over the course of the year, instead of an average of the monthly averages. Below is an example of what this would look like (again with days instead of months and a week instead of a year):

image.png

Thanks,

Emily 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...