Dynamically Calculate Property Value on Index

(Apologies if this has been asked before)

Is it possible to dynamically calculate a product’s property when the data syncs? We’re using Algolia for a BigCommerce client and they would like a facet for “discount %”, but that’s not an attribute that gets synchronized from BigCommerce. I know it could be done with the use of a custom field, but I’d rather not leave it open to human error in case they forget to update the field when modifying pricing. Is it possible to calculate this on the data index?