# Examples of custom expressions

You can create your own expressions using various mathematical and logical functions, and apply them directly on an axis in a visualization. The following examples give you an idea of how custom expressions can be used to retrieve more information about your data.

**Showing fewer digits on an axis by dividing a result with 1000**

With custom expressions you can do just about anything with the columns in your data. The example below shows how you can use a custom expression to divide the result on the value axis by 1000, so that the axis value is shown in thousands of dollars instead of dollars.**Calculating the sum of two or more columns**

The total sum of all values in two or more data columns can be calculated.**Showing the difference between the values in two columns**

With custom expressions you can do just about anything with the columns in your data. The example below shows how you can use custom expressions to calculate the difference between a Sales column and a Cost column to directly show the Profit for different products.**Calculating profit in percent**

The example shows how to use an custom expression to calculate the ratio between the net profit and the cost of investment.**Calculating time periods**

You can calculate differences between columns containing points of time to retrieve time periods. The result can be expressed in various units of time.**Setting conditions on axes**

When creating a visualization, you select which columns to present on the various axes, and how to aggregate the data. What is more, you can determine in more detail what to display by specifying conditional expressions on the axes. That way, what is shown in the visualizations depends on the conditions.

**Using a different version of Spotfire?**

This help describes the web client version of Spotfire on TIBCO Cloud™. If you're looking for documentation for the installed client or other versions of Spotfire, visit the TIBCO Documentation Portal.

* There you can find help for your version of Spotfire Analyst or Spotfire Business Author.*