Average question

How to store the average values of the data of a sensor through Arduino in an sd card?

The same way that you would store the discrete values, or any other date. create or open a file on the SD card and write a record to it...

Or are if out asking how to calculate an average? Add up all the measurements and divide by the number of them.

I swear it seems like some people can't be bothered to google a guide and instead expect a bespoke rehashing of the same information.