Hello, I have a table.I would like to find an average value of one common in the table. I mean that i would like to do the sum of all values of the column divided by the numbers of rows of the table.
Hello, I have a table.I would like to find an average value of one common in the table. I mean that i would like to do the sum of all values of the column divided by the numbers of rows of the table.
I would use a Table.query with AVG accumulating clause of the column name
double myColAvg = Table.query(“SELECT AVG(myColName) FROM myTableName”)[1][1];
Thank you @Jörg Vogel.I have tryed to use the code that you have posted but I don't know if I use it correctly.
I would like to print the result in a specif column and row of the table but I'm not sure how to do it.
I have tryed in this way:
double myColAvg = Table.query(SELECT AVG(cantidad) FROM ListadoOF_Lectura)[1][1]; Table("ListadoOF_Lectura")[1][9] = myColAvg;
@Francesco V2, you assign correctly the value into a cell row 1 column 9. Is there a problem, that you can’t get the average of column cantidad?
Yes, in the table don't appear the result, I don't know the reason, in the column I have only inter numbers.
Good morning,@Jörg Vogel, thank you for your file and suggestion, you made my day better.
7 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved