Most of the time all entrepreneurs take all sorts of calculations. It can be commissions for yourself and your colleagues and other calculations regarding customers, for example, the amount of the transaction, taking into account the discount and the price for all the products requested.

In this article, we will tell you how to free yourself from this routine and rely on automation.

Let's take these two cases above.

**COMMISSION CALCULATION**

Imagine you are a Real Estate agent. You have a deal and all the related information.

When you fill out all the information you have in respective fields, the "**Commission $**" field will automatically calculate your commission for a closed deal.

To set up such automation - go to your "**Settings**" -> "**Folder and field management**" tab (switch to **Fields**).

Add next fields:

**Total Price** (*field* *name can be changed*) with "**Number"** type and **Commission** (*name can be changed as well*) with "**Percentage"** type.

After that, add field **Formula** with "**Numeric" **type and put there the following:

= field("Total Price $") * field("Commission %")

As you can see, a **Formula **field takes values from the given fields and converts them in accordance with the given rule.

**NOTE:** Formula field requires the **exact names** of the given fields. Otherwise, you will receive an error.

**DISCOUNT CALCULATION**

Now imagine you sell craft mugs. Recently you have sent a promo which states everyone who orders 10 or more of your mugs receives a 20% discount on a bill.

**Total price **field calculates the sum of the **Quantity **and **Price per unit **fields and **Total Price (with 20% discount) **also adds a 20% discount to it.

Iterate first step of the previous example - go to your "**Settings**" and find corresponding folder to add following fields:

**Quantity **with "**Number**" type and **Price per unit **with "**Currency**" field type.

After that, add 2 **Formula **fields with "**Numeric" **type and put there next:

=field("Price per unit") * field("Quantity")

and

=(field("Price per unit") * field("Quantity")) * 0.8

**GENERATING A CLICKABLE URL**

For URLs that are composed of the domain and the ID you can create a clickable URL field in NetHunt.

To do so, set up the separate fields for the **web site** and the **ID** and **a text statistical field** to combine the two.

When you **put in the values for your two text fields** (Amazon and ASIN in our example) your formula field will generate a clickable URL.

You can **click on it** and open in the new or current tab. The URL of the page is correct and we're looking at the valid product from Amazon. **This feature can work for multiple websites and IDs!**

**NOTE:** Formula field requires **exact names** of the given fields. Otherwise, you will receive an error.

**Number of days between two given dates**

NetHunt can help you calculate the number days between two given dates. This can help you for example realize how much time you have between a starting deal and its delivery and can prioritize those which need urgent attention.

To do so you need two date fields in your folder, in this example we have a "StartDate" and an "EndDate" and we'll calculate how many days are in between with a formula field.

Then the formula to calculate the days between should be as follows:

=_time.days_between(field("StartDate"), field("EndDate"))

This way you'd be able to calculate the days:

That's it! You've successfully set up the formulas to calculate your values automatically. That way you can save lots of time for yourself and other people.

**Conditional formatting **

NetHunt formula field allows some conditionals including IF, THEN and ELSE. For example if you give a 10% discount to your customers who buy more than 100 articles. You could create a formula field named Discount and use the formula as follows:

**=if field("Number of articles") > 100 then 10 else 0**

After, you can have the final price calculated based on the price and discount in another formula field:

**= field("Price") - (field("Price")*field("Discount"))**

NetHunt formula allows you to create conditionals also base on strings from other fields. For example, you have a "deal amount" field representing the money that a deal implies; you are dealing with different currencies American dollar (USD) and Canadian dollar (CAD) specified as a string in a field "currency type"; you can have an "exchange rate" field accordingly and you need a field that translates all the amounts to a unified currency, USD.

**= if field("currency type") == 'CAD' then field("deal amount") * field("exchange rate") else field("deal amount")**

Haven’t found the answers you’re looking for? Ask our User Community.