Variables are values computed by Phrazor based on defined business logic. They are represented by insights in natural language to tell the underlying data story.
In the Phrazor report, click the highlighted icon (Edit Sentences) on the insight card to look at an exisiting variable
The insight opens up. Click on the sentence you want to check
In the Business Logic & Language editor, the left pane is a listing of the current variables. Click on the underlying variable
You can see the Business Logic and the corresponding Language for this variable. Langauge is the insight you see on the report with the computed value inside the variable
To create a variable, inside the Editor, Click to add insight from scratch
Click on the new card
In the Business Logic & Language editor, on the left pane click Create Variable
You can look up the data function by entering it in Search
Or enter the name of the function in the Formula tab based on the business logic you want to define.
In this scenario the variable is required to identify the Sales Value for the Top 2 Regions. Click Run
The Preview indicates which are the Top 2 Regions and what are their corresponding Sales Values
The formula can be split to reflect the Regions (Keys) and the Sales Value (Values) separately. Add the Values data function in the formula and click Run
The Preview showing the output appears below. Name the variable and click Save. The name must be indicative of the Variable's function. Note: Phrazor does not allow spaces between words in the Variable Name.
The saved variable appears on the left in the list of variables
Repeat the same steps to create a variable for Keys. Enter the formula. Click Run
Check the preview, name the variable and click Save