Natural Logarithm as calculation option

I would need to use the logarithm log() or even better the natural logarithm ln() in order to create a customer valuation score. I need to use the ln() because I don’t want explosive behaviour in my function if for example the value of a variable is unnormaly huge for some customers. Unfortunately this basic arithmetic function is not possible in Hubspot. I would really appreciate if someone had a solution for this or if this could be developed.

Hey @FabioLangbein, thank you for posting in our Community!

Currently, HubSpot does not support direct use of logarithmic functions (log or ln) in its built-in calculations.

However, you have a potential workaround, as you can export your data from HubSpot, perform the necessary logarithmic transformations in a tool like Excel, Google Sheets, or any programming environment such as Python, and then re-import the transformed data back into HubSpot.

To our top experts, @Anton and @DanielSanchez, any recommendations for @FabioLangbein matter?

Thank you,

Pam

Hey @FabioLangbein

If you’ve got access to custom code workflow actions (ops pro or ent), you could create a custom property on the record and use the python "log()" function to return the ln of a given value. Then use that property in you calculations.

The scenario might look something like:

  • If *property name* is known
  • get value and calculate the nl using a python 3.9 customcode action
  • set record ln property value
  • with this value populated your calculated property should complete

If you have any questions please don’t hesistate to reach out!

You can use a third-party tool that supports 2-way sync with Google Sheets to solve this. For eg - Superjoin

Here’s how you can implement any such tool to solve this usecase:

  1. Use Superjoin(or a 3P connector) to pull the specific property you want to calculate from HubSpot into Google Sheets.
  2. In Google Sheets, apply a formula like =LN(A1) to perform the calculation. You can also create more advanced calculations if needed.
  3. Once you’ve completed your calculations, use Superjoin to push the updated data back into HubSpot seamlessly.

It’s an easy way to automate and sync your data for calculations and updates!