Hello @loppisinorge
You can use the AVERAGE operation in the Mathematical operations module (https://cff.dwbooster.com/documentation#mathematical-module)
Please, enter the following equation in the “Set equation” attribute in the calculated field:
AVERAGE(3,3,3,3)
Best regards.
Thanks for replying, i added the average as you said. But it’s still not showing the average.
heres what i put in:
AVERAGE(fieldname12+fieldname26+fieldname13+fieldname38+fieldname25+fieldname37+fieldname24+fieldname36+fieldname23+fieldname35+fieldname22+fieldname34+fieldname21+fieldname33+fieldname20+fieldname32+fieldname19+fieldname31+fieldname18+fieldname30+fieldname17+fieldname41+fieldname16+fieldname29)
Hello @loppisinorge
If you sum the fields you are not calculating their average.
The correct would be:
AVERAGE(fieldname12,fieldname26,fieldname13,fieldname38,fieldname25,fieldname37,fieldname24,fieldname36,fieldname23,fieldname35,fieldname22,fieldname34,fieldname21,fieldname33,fieldname20,fieldname32,fieldname19,fieldname31,fieldname18,fieldname30,fieldname17,fieldname41,fieldname16,fieldname29)
The values are not 3,3,3,3 constant. They change pending on the users grade. How do i set it up, so that the calculator automatically picks up every fieldname i wrote earlier and their values, and calculates the average?
Hello @loppisinorge
Please, read my previous entry.
Best regards.
I’m terribly sorry for being ignorant and useless.
Thank you for taking time to help!
Basically, I’m trying to recreate this calculator:
https://karkalk.no/
Which shows the average grade. It adds up all the numbers/credits and divides it by the amount chosen.
For example: 3 + 4 + 5 + 6 = 18 / 4 = which gives 4.5.
That’s all i am trying to do haha. I just need to know how to do so.
Once again, thanks for taking the time to help.
When using:
AVERAGE(fieldname12,fieldname26,fieldname13,fieldname38,fieldname25,fieldname37,fieldname24,fieldname36,fieldname23,fieldname35,fieldname22,fieldname34,fieldname21,fieldname33,fieldname20,fieldname32,fieldname19,fieldname31,fieldname18,fieldname30,fieldname17,fieldname41,fieldname16,fieldname29)
It gives the wrong answer.
Hello @loppisinorge
It is important you follow my instructions. I checked your form again, and you have not replaced the plus (+) symbols by commas (,) in the equation of the fieldname43 as I recommended in a previous entry.
Best regards.
Can you check again?
I copy-pasted:
AVERAGE(fieldname12,fieldname26,fieldname13,fieldname38,fieldname25,fieldname37,fieldname24,fieldname36,fieldname23,fieldname35,fieldname22,fieldname34,fieldname21,fieldname33,fieldname20,fieldname32,fieldname19,fieldname31,fieldname18,fieldname30,fieldname17,fieldname41,fieldname16,fieldname29)
I put in 3 + 4 + 5 +6. This should be 18 in total and divided by 4, it should than be 4.5.
Instead it is 0.75 as the picture shows:
https://pasteboard.co/QfnkysRH9Zjv.png
Hello @loppisinorge
If you have AVERAGE(a,b,c,d,e) and you enter only the values of a = 3, b = 4, and c =5, the plugin will evaluate the operation as follows:
AVERAGE(3,4,5,0,0) = (3+4+5+0+0)/5 = 12/5 = 2.4 and not 4
Best regards.
How can i fix it so that last calculated field, shows the right number?
I follow copied your solution and it still does not show. I showed you the link i wanted to copy.
Im trying all kind of solutions and im not getting the correct number.
Hello @loppisinorge
If you want to ignore fields with zero value, you can edit the equation as follows:
AVERAGE([fieldname12,fieldname26,fieldname13,fieldname38,fieldname25,fieldname37,fieldname24,fieldname36,fieldname23,fieldname35,fieldname22,fieldname34,fieldname21,fieldname33,fieldname20,fieldname32,fieldname19,fieldname31,fieldname18,fieldname30,fieldname17,fieldname41,fieldname16,fieldname29].filter(function(n){ return n != 0; }));
Best regards.
That worked!!!
Thank you so much! 😀