Calculated Fields
The goal of self-serve data analytics is to let anyone within the organization to be able to analyze the data they have access to. One of the key challenges with this is that each user might want to analyze different metrics or the same metric with their own business logic or alter the formula for what-if-analysis. It is simply not possible to create all of these calculations within the traditional server-side analytics solutions due to the amount of computation. In addition, it also creates a bottle neck for the IT departments to manage all these business requirements to create a business layer. Of course, there are times this is important so everyone is using the same metric definitions. However, that is only when the metrics are well defined. But if the users are exploring data and finding new insights and correlations they may want to freely explore by continously tweaking their metric definitions.
Calculated fields provide the ability to write custom logic that is executed on a per-row basis. While the model layer has this separation of physical fields and logical fields, the visualization layer doesn't know or should it care whether a field is physical or logical.
SQL Frames low-code API allows creation of various types of calculated fields. SQL Frames Designer makes it possible to create script (JavaScript) based calculated fields.
We understand that while the goal of the SQL Frames Designer is to offer a no-code solution, creating calculated fields require writing some code. To reduce the burden of writing and debugging the calculated fields logic, SQL Frames Designer offers a continuously evaluated preview of the calculations on the data so the users have a sense of what they are doing.
The following screen recording shows
- the creation of a calculated filed
- converting the numeric field into a dimension
- using the dimension field within a chart
The usecase is to create a Days to Shipment
field and then analyze the distribution of number of days it
takes to ship an order.