The Formula Playground is a tool that allows you to test your formulas without constraint of types or dimensions.
How is Formula Playground different from Metric Block?
When you create a metric, the very first step is to define the Type of that metric (Text, Number, integer, Dimension etc...) and to select the dimension of that block. This comes with two constraints:
- Type: the formula is invalid if it generated data of the wrong type.
- Dimensions: if the formula's Dimensions doesn't match the block Dimensions. an automated hidden dimensions alignment process is applied. Missing dimension are added with a constant allocation. Dimensions in surplus are removed with a default aggregation (sum for numbers)
With the Formula Playground, those two constraints are removed. You can estimate a formula as it is without having to know the type nor dimensions beforehand.
The system will estimate the block Type (Number, Text, Integer, ...) and the dimensions of the generated block. This way you can very easily play with the Formula Playground and check how your dimensions modifiers impacts your block dimensions.
How to access the Formula Playground?
There is three ways to open the Formula Playground :
- from the Block Explorer page:
- from the Metric/Tables formula bar
- from the Metric creation modal
How to use the Formula Playground?
Once the Formula Playground is open just start typing your formula in the formula bar to see how it's evaluated!
The Formula Playground offers all standard features you have on metrics except Manual inputs and View management. As explained previously the main difference is that the block dimensions and type will be deduced from the formula you entered.
If you want to "save" the result of your formula, use the "Create Metric" button on the top right. It will generate a new Metric with the correct type and dimensions.