Unit 5 · Make Basics: Functions

Transforming Data - formatNumber

6 min read Updated May 21, 2026

Unit introduction

Welcome to the final unit of “Transforming data using functions” in Make Basics.

The last function that you are going to explore in this course is formatNumber().

By the end of this unit, you will:

  • understand how the formatNumber() function works

Before you continue, make sure you’ve completed the exercise in unit 1 of this course.

formatNumber() - what does it do, and what can it be used for?

The formatNumber() function is a tool that changes the way a numerical value is displayed, and converts a number to a text/string.

A common use case is separating thousands. For example, if you have a number with the value of 1000000, you can use formatNumber() to modify it to display commas, making it easier to read (e.g., 1,000,000).

Over the next few pages, you will perform an exercise that takes the value of 150000 and uses the formatNumber() function to tell Make how you want this to appear. You will convert the value so it can appear in the following formats:

  • 150.000,0
  • 150.000,00

Structure of formatNumber()

Now you have a value that can be transformed. Before you do that, let’s explore how the formatNumber() function works.

The formatNumber() function appears as follows:

formatNumber( NUMBER ; X ; Y ; Z )

Here’s what each part represents:

  • NUMBER represents the mapped value.
  • X represents the number of decimal points.
  • Y represents the decimal separator.
  • Z represents the thousands separator.

X: Number of Decimal Points

The decimal point separates a whole number from its fractional part using a dot. For example: 9.99

Y: Decimal Separator

Decimal separator can be . (dot) or , (comma) depending on where you are based. For example: 13.12 or 13,12

Z: Thousands Separator

Thousands separator is used to separate groups of three digits in a large number, to make it easier to read and understand.


Note that the Y and Z are optional for the formatNumber() function – if you do not specify these, they will default your organization settings.

The aim for the next exercise is to take the value of 150000, and present it in this format: 150.000,00.

Exercise 1 - generating a number

As with all of the functions that have been explored so far, you’re going to need to build a scenario. Work through each stage before you continue.

Basic Trigger

The purpose of this exercise is to create a bundle with a custom bundle of data named cost. The number is the most important part here, as it’s what will be used in formatNumber(). In order to do this you are going to explore a new tool for the purpose of this exercise: Basic trigger.

A basic trigger allows you to create a custom trigger and define the structure of the output bundle. For example, the bundle will have the following fields in a particular order: Name, Address, Contact details

Create a new scenario and name it formatNumber exercise.

Add a new module and search for ToolsBasic trigger. Alternatively, click the Tools icon and select TriggersBasic trigger. This will allow you to generate a bundle – this is a really handy tool for testing!

Open the basic trigger and click Add item. This will create a branch of different items; click Add item again. This will create another branch that states name / value.

In the name field, type Cost. This will name the item, and will display as Cost when you attempt to map it. In the value field, type 150000. Click OK when you are finished.

Let’s look at the output of this module – click Run Once, and click the operations counter. You will see your output bundle as shown on the image. You now have data that you can map for the next stage of this exercise.

Exercise 2 - using formatNumber

The final step here is to put our generated number into a Google Sheet and use a function to change the format of the output. Work through each stage before you click Next.

First, add a Google SheetsAdd a Row module to your Basic Trigger. Configure it by selecting Basic Functions as your Spreadsheet ID and FormatNumber as your Sheet Name. Ensure Table contains headers is set to Yes.

Next, scroll down to the Values section. You should see the headings you set up earlier in Unit 1: Cost (A), 1 decimal point (B), and 2 decimal points (C). The first step is to map cell A. Notice the cost item you created before appears here; this is what you will use for mapping this exercise. Click within the cell and map the cost item. If you click Run once now, you will see this mapped within your Google Sheets, showing the default value of 150000.

Now, click within the cell for 1 decimal point (B). Navigate to the math functions tab and map formatNumber(). Map the cost and replicate the following function: formatNumber (cost;1;.;,) Adding a 1 will transform the number to 1 decimal point. If you click Run once now, you will see this mapped within your sheet. It will show the value of 150.000,0. The function has separated the whole number from its fractional part by 1, using the separators you specified.

Finally, repeat the same process within the cell labeled 2 decimal points (C). This time, you should map the value 2 instead of 1. The function should look like this: formatNumber (cost;2;.;,) If you click Run once now, you will see this mapped within your sheet. It will show the value of 150.000,00. This is what you expect; again, the function has separated the whole number from its fractional part by 2, using the separators you specified.

Optional: You could choose to repeat this function with additional decimal points. For example, formatNumber (cost;3;.;,) will return 3 decimal points.

Use case

Now you know how to map an item and use the formatNumber() function. Where could this be usable? Let’s look at the use case of Gareth.

Business

Gareth has an online business selling cars. He wants to send invoices to his customers via email.

Need

His accounting software returns values in the following style: 10000.359

This isn’t the neatest format, and Gareth wants to automate changing this format to a more readable value.

Format

Gareth creates a scenario within Make that will pull several values (name, email address, invoice total) to create and then email an invoice. When mapping the invoice total he utilizes the formatNumber() function as follows: $formatNumber(invoicetotal;2;.;,)

On the invoice this is reflected as $10,000.36

This ensures that his data is accurately represented and easy to understand by his customers, reducing the risk of errors or misinterpretation. Additionally it has rounded his number up from 359 to 36.