Custom expressions
Custom expressions allow you to set up your data the way you want it by combining one or more columns with aggregation measures and/or mathematical expressions. This gives you the opportunity to obtain more information from your available data.
If your data contains the information you need to calculate a certain number, you can use a custom expression on an axis to display what you want. When a custom expression is used, the values on that axis are dynamically recalculated when data is filtered. Only filtered data is displayed.
When you start writing in the Custom expression dialog, the editor will help you find available functions and columns starting with the letters you have written in the dialog, and you can select the function of your choice from the list. A tooltip will provide a description about the shown functions. See also Operators and Functions for complete descriptions of the available operators and functions.
- 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 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. - Custom expression language details
If you learn how the custom expression language works, the creation of valid custom expressions will be easier. This topic attempts to explain some basic functionality of the language.