calculate complex formula

Answered
Luana Piroli asked on February 24, 2023

I take the opportunity to ask how to execute a complex formula like this
Avg ( if( [Buffy Coat WBC/µl]<>0, [Buffy Coat WBC/µl]))
+
Stdev ( if( [Buffy Coat WBC/µl]<>0, [Buffy Coat WBC/µl]))
 
Best regards

5 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster February 28, 2023

Hello, Luana!

Thank you for your question.

Please note that using formulas inside of aggregations are not supported. We recommend using the report filters to achieve the same result as on your formula. First, exclude measures equal to zero from the report. After this step, create a calculated value to count the sum of average and standard deviation.
Our team prepared an example to illustrate the idea: https://jsfiddle.net/flexmonster/68o4mxck/

Please let us know if this approach would work for you.

Best Regards,
Maksym

Public
Maksym Diachenko Maksym Diachenko Flexmonster March 7, 2023

Hello, Luana!

Hope you are doing well.
We are wondering if you had time to check the provided workaround for excluding zero values while calculating the formula. 
Please let us know if it worked for you.

Best Regards,
Maksym

Public
Maksym Diachenko Maksym Diachenko Flexmonster March 14, 2023

Hello, Luana!

Our team would like to know if you tried using the provided workaround to filter out zero values from calculated values.
We are looking forward to hearing your feedback.

Best Regards,
Maksym

Public
Luana Piroli March 14, 2023

I apologize but due to family problems I was unable to try.
I'll try the script tomorrow.
from your example, however, it would seem that in this way the rows containing the value 0 are excluded. if you had another column with field count this would have the same condition or am i wrong?
Best regards

Public
Maksym Diachenko Maksym Diachenko Flexmonster March 15, 2023

Hello, Luana!

Thank you for your reply.
As you mentioned, this filter excludes the entire rows containing zero values. Hence, applying it will affect the values in other measures. 
Feel free to contact us if any other questions arise.

Best Regards,
Maksym

Please login or Register to Submit Answer