Calculating Standard Deviation with Confiforms

alex b December 16, 2019

Hello,

I am trying to find a way to calculate the standard deviation for data inside of a confiform table. The issue I run into is that when using the tableview merger and field macros it only resolves summations and thus the square root property is not calculated properly. I have not been able to figure out a way to implement IFTTT or a field rule in order to collect the data from previous entries in order to calculate this value either.

 

Im not skilled with Javascript and was wondering if anyone had any tips or solutions to this issue.

2 answers

2 accepted

2 votes
Answer accepted
Natalie Paramonova _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2019

Hi @alex b ,

You can calculate the standard deviation with the help of the Table Transformer macro bundled in the Table Filter and Charts for Confluence app. The app is compatible with ConfiForms.

1. Place the macro outputting tables within the Table Transformer macro body:

2019-12-17_15h43_38.png

2. Use the following SQL query (select the functions depending on what you'd like to calculate):

SELECT
MEDIAN(T1.'Value') AS 'Median',
STDDEV(T1.'Value') AS 'Standard deviation population',
STDEV(T1.'Value') AS 'Standard deviation sample',
VAR(T1.'Value') AS 'Variance sample',
VARP(T1.'Value') AS 'Variance population'
FROM T1

Where 'Value' is the label of the column from the source table with values, 'Median' and others are the labels of new outputted columns with results.

2019-12-17_15h44_23.png

The result is as follows:

2019-12-17_15h45_49.pngPlease let me know if you have any questions.

alex b December 17, 2019

Thank you! That was super easy to follow. Much appreciated!

Natalie Paramonova _Stiltsoft_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 17, 2019

You are welcome!

1 vote
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 16, 2019

You cannot do that with a ConfiForms TableViewMerger (or setting the expression in the ValueView), as the calculations are done per row / record

But you can do it with a little help of JavaScript and using ConfiForms REST APIs, as shown here, on our wiki - https://wiki.vertuna.com/display/TEST/Averages%2C+totals%2C+sums+and+standard+deviation+calculation

alex b December 17, 2019

Thank you for the help! Much appreciated.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events