Use formulae in Target Dashboard to do more with your data

Last Updated: Tuesday, November 11, 2014 by Sofi Hjalmarsson

Learn how to turn text into numbers with sbool()

Formulae in Target Dashboard range from simply adding two columns together to advanced functionality that allows you to delve deeper into your data and create weighted scores or turn text into quantifiable values.

Today, we’re looking at the sbool() formula, which can convert text in your data table into a value. This can be very useful if you are working with survey or questionnaire data, which often returns yes/no answers or other textual responses.

Using the sbool() formula we can turn our yes and no answere into ones and zeros. This means we can count them, calculate percentages against the total number of responses, and perform a whole host of other analytics that require a numeric response rather than a textual one.

With the sbool() formula, we can generate a column of ‘1’s and ‘0’s instead of yes and no. It works like this:

sbool([column id to check],”text to look for”)

A real example of this formula using the yes/no example above might look like this:

sbool([45634],”yes”)

This will check the specified column for rows that contain the word “yes”, and if such rows are found, the formula column will be populated with a ‘1’. Where it finds something different or nothing at all, it will place a ‘0’ in the formula column.

Your table could end up looking something like the one below. In this table we have created a second column using the sbool() formula that counts the number of no answers.

Date

Did you find this useful?

Yes

No

Jan-14

Yes

1

0

Feb-14

Yes

1

0

Mar-14

No

0

1

Apr-14

Yes

1

0

May-14

Yes

1

0

Jun-14

No

0

1

Jul-14

No

0

1

Aug-14

Yes

1

0

With such a table, we can calculate the total number of responses or the percentage that each response type is of the total. We can easily build a stacked chart and compare trends over time – you name it!

If you want to learn more about the formulae you can use in Target Dashboard, you can download our formula help sheet, or if you want some help, just let us know.