Attribute types: number and percentage

Alica Kačengová

This is the second post in the series about Attribute types in Lumeer. In the first post, we introduced the concept of Attribute types. Now we are going to look closer at two of them: Number and Percentage.

You can of course enter numerical values into the column even if the type is not set at all (equal to set to None) or Text. Also, you will be able to perform calculations on those values – similarly to how you would do in a spreadsheet. However, the number attribute gives you more power over the integrity of the values.

Let’s demonstrate this on an example: We have this table containing data about projects:

Remaining portion is calculated as following: (Budget – Spent)/Budget

If we have budget 1500 and spent 300, the remaining portion will of course be 0.8:

But what happens if we enter 1000 and “abc”? Well, the result cannot be calculated and “NaN” (not a number) is displayed.

“abc” is an invalid value. We don’t want invalid values in our data, but mistakes can happen, especially if multiple people work with the same table. Setting the attribute type to Number solves the problem – if somebody tries to enter an invalid value, they just cannot proceed. If the value was entered before the type was set, it is highlighted (red underline) as invalid so you can easily spot and fix such an irregularity.

The next thing you can enforce with the Number type is that the values are from a certain range. Just set the minimum and/or maximum. The behaviour for invalid values is the same – old ones are highlighted, new ones cannot be saved.

The Percentage type works in the same way as the Number type (the value actually is a number), the only difference is that Lumeer treats the values as fractions and displays them as percents. As a result, instead of the following table

you would see:

It’s just a visual change, but if you look at a list of projects, there is a high chance that you will be able to process the information faster if you see percentage instead of a decimal number.

And what can you do with numbers and percentages?

First, as we already mentioned, they can act as a function input (see manual on functions for more detail).

Second, you can display their values in a chart perspective. We first add a couple more values to the table:

And then configure the chart:

Thirdly, you can aggregate values across the rows in a pivot table. This complex pivot table comparing stock vs. demand of items across multiple depots is from Lumeer’s Supply chain management template:

Last but not least, you can use the percentage value to display tasks progress in timeline view. If we switch this table from Project tracker template

to a timeline view and configure it, you see tasks’ progress in each row (it is displayed in darker green):

In the next article, we will look at the Date and Duration attribute types.