Como usar médias em gráficos

Olá parceiros!

Gostaria de saber como usar médias em gráficos no glide pages.

Eu tenho um tabela que possui notas de avaliacao de qualidade de funcionarios.

Montei um gráfico que é exibido no perfil de cada usuario que mostra a sua nota por semana.

Acontece que essa nota está sendo somada e não em média.

Como resolvo isso?

*Considere que em uma mesma semana determinado funcionário pode ter mais de uma avaliação.

I assume you have an external table to store quality assessment scores with a structure like this:

Employee ID - Date of Assessment - Score

What I would do is:

  • Create a math column to determine the numerical value of the week. It can look like this:

YEAR(D)*100+WEEKNUM(D) with D being the date of assessment.

  • Create a query column, pointing at the same table, filter by employee ID is this row > employee ID and weeknum equals to this row > week num.

  • Create a rollup column to get the average number from that relation.

  • Add a rowID column if you haven’t.

  • Create a single value column to get the first rowID from the query column.

  • Go back to your Users table. Add a chart based on the relation from the Users table to the Assessment table, filter the rows to show by rowID equals the single value above (act as a unique function), and show the average number.

  • You might want to add a few steps to determine the start and end dates of the week to show as labels on the X axis.

1 Like

Para que isso funcuone, eu preciso fazer na tabela de usuarios?

Porque no meu app eu tenho uma tabela de funcionários que não fazem login e a tabela de usuarios.

Fiquei um pouco confuso.

You can move the logic to the Employees table, and show the chart in each employee’s details screen. This is assuming you are storing quality assessment scores for employees.

Funcionou! Sensacional! Muito Obrigado!!!

1 Like

Great to hear!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.