All Collections
Data
Creating Measures in the Data View Editor
Creating Measures in the Data View Editor

No coding is required to write expressions using Astrato's measures in the Data Explorer.

Christophe Costantini avatar
Written by Christophe Costantini
Updated over a week ago

Introducing Custom Measures

Using Astrato's Custom Measures, create the metrics that suit your business using orders of operation with multiple fields, aggregation, and filters- no coding required.

There's also no new syntax or structures to learn. It's a simple point-and-click to create custom measures.


Custom measures, also known as calculations, advanced measures, or multi-field measures, add flexibility to your model.

You can include your custom measure in any workbook. Create your custom measure using the functions, fields, and filters, and save it as a new measure with a description.

Please note: Custom measures are not supported with Google Sheets.



Building your custom measure

Adding a custom measure

  1. Once you've added and selected the data you want to use in the Data View Editor (DVE), click Define to set up your dimensions, measures, and joins.

  2. There are three ways to create a measure in the dataview editor.

    1. Click on the plus Icon on the left panel.

    2. Click on the icon near a field and click on "Add measure"

    3. In the Data Explorer, you can check the box in any measure header and click on the measure button in the top right corner.


Creating a Custom Measure

  1. Select an operator and a field

  2. Add additional aggregations by clicking on the math operators button

  3. Add brackets as needed to define the calculation order for the measure.

  4. You can add filters and settings for each aggregation by clicking on the filter and cog icon in the box.

  5. Select the format for the measure.

  6. Click Create. You can now use the measure with the data in your workbook.

Creating a Row-Level Measure

A Row-Level measure is a unique use case when the mathematical operation is done first and then the aggregations.
For example, calculating total value when you only have quantity and unit price.

Below are the steps to create a Row-Level measure.

  1. Select a field

  2. Select the mathematical operator you want to use

  3. Select another field

  4. Create a bracket around the two field boxes

  5. Click on the blue ⨍x icon and select an aggregation type

  6. Optional- Add filter and measure settings.

  7. Select a number format for the measure.

  8. Click Create. You can now use the measure with the data in your workbook.

Adding Filters to a Measure

  • Measure filters allow users to extend the range of business questions they can answer by creating a wider range of measures.

  • Measure filters are applied only to the measures and not to the tables.

  • Each type of field has different filter options.

  • A unique type of filter is offered for Date\Timestamp fields predefined periods. This type of filter is a dynamic date range applied as a filter on the selected date field.
    More on predefined filters.

  • There is no limit on the number of filters added to a measure; a user can set the operator between two filters and use brackets to group the filters in the desired order.

To add a filter to a measure:

  1. Click on the filter icon

  2. Select a field filter type, and value

  3. Optional - Add more filters

  4. Optional- Select the operator between any two filters

  5. Optional- Use brackets to group filters.

Measure Special Settings

There are special measures that can be added to measures.

  • Total - This will enforce calculating the measure, disregarding the chart's dimensions.
    For example, Calculating the share of Sales.

  • Allow Fanout -
    A "fanout" happens when you join two tables, and a single value gets duplicated in the end result. This screws up aggregation since some of the values are being double-counted.

    This feature allows you to calculate measures from the one side in a one-to-many relationship and the dimension from the many side.

    • Remove duplicates- this setting ensures a correct result when using certain aggregation types like Sum, Count, and Avg.

To enable a special setting, click the cog icon in the measure dialogue and check the box near the setting you want to enable.

Did this answer your question?