Create Calculated Columns Using the Compare Table | Salesforce
Create Calculated Columns Using the Compare Table
Use the Compare Table to define custom formulas with columns of data. View measures side by side, and perform math across the table’s columns and rows.
Available in Salesforce Classic and Lightning Experience.
Available for an extra cost in Enterprise, Performance, and Unlimited Editions. Also available in Developer Edition.
User Permissions Needed
To view visualizations:
“Use Wave Analytics”
Select Compare Table from the chart type gallery.
Add dimensions by clicking Group.
Null values that occur in the data are displayed as minus signs ("-").
Change the first measure by clicking the cells selection (”Count of Rows”). Add more measures by clicking the arrow in the measure column header and then selecting Add a column.
With the new column selected, click the cells selection to change the measure. You can also apply a filter by clicking the header of a measure column to select it and then clicking Filter. Dimension columns are on the left and measure columns are on the right. The measure columns are identified in formulas as A, B, C, and so on, with A being the far left measure column.
Add a measure column to hold a custom formula, and then select Edit this column from the drop-down menu.
In the Formula field, create formulas using operators from this table.
Measure columns are identified by uppercase letters from left to right.
Addition, applied per row.
Subtraction, applied per row.
Division, applied per row.
Multiplication, applied per row.
Parentheses for grouping operations.
In the column editor, you can enter SAQL formulas, including math functions, or choose a windowing function to calculate the values in the column. You can also name the column and choose a number format. If any of the formulas contain division by zero, the result is displayed as a minus sign ("-").
To use SAQL, enter it directly into the formula editor, then click Apply to see the result.
See the Wave Analytics SAQL Reference for more information on writing SAQL.
The percentile_desc and percentile_cont functions can’t be used in windowing functions entered in the formula editor.
To use a function, choose the formula editor and then choose one of the windowing functions from the menu. After you configure the function, click Apply to see the result.
Switch to the formula editor to see the SAQL generated by the chosen function. You can edit the SAQL in the formula editor after generating it with a function just as if you’d written it.