Virtual Column Calculations
Virtual columns in Model allow the creation of calculations to derive new columns from values in other columns within a single row. They are especially useful and important in "Direct Query" models where row level calculations need to be defined against the data. Virtual Columns provide a "No Code / Low Code" approach, obviating the need to write custom SQL queries to perform these calculations. Unlike in a Data Flow, the calculated column is not materialized, but is calculated at run time as part of the query generated by the Pyramid query engine, Pyrana.
Accessing Virtual Column Calculations
The Virtual Column graphical editor can be accessed from two locations, the Table editor and the Column editor. The functionality offered is identical, which option is taken is down to personal preferences.
From the Table editor, click on the "Add Calculated Column" icon in the table header indicated by the red boxes below:
From the Column editor, click on the "Add Calculated Column" option in the top right hand corner:
Both of these options will open the Calculated Column graphical editor