Mprove
.mdx

Report

Reports, Charts, Dashboards are intended to be created and modified through the user interface. The file representation is for checking errors during validation.

Each Report must be stored as report_name.report YAML file:

report: report_nametitle: ''access_roles:- role- roleparameters:- filter: f1  label: ''  description: ''  result: string  suggest_model_dimension: model_name.field_path  conditions:  - f`%a`- filter: f2  store_model: ga  store_result: string  fractions:  - logic: OR    type: contains    controls:    - input: value_input      value: a- filter: f3  store_model: ga  store_filter: top_config  fractions:  - controls:    - selector: ga_property      value: 123123123    - date_picker: start_date      value: $METRICS_DATE_FROM    - date_picker: end_date      value: $METRICS_DATE_TOrows:- row_id: A  type: empty- row_id: B  type: header  name: 'name in UI'- row_id: C  type: metric  metric: metric_id  show_chart: true  format_number: '$,.0f'  currency_prefix: $  currency_suffix: ''  parameters:   - apply_to: field_path    listen: f1- row_id: D  type: metric  metric: metric_id  parameters:   - apply_to: field_path    conditions:    - f`> 100`- row_id: E  type: metric  metric: ga.screen_page_views.by.event_created_at  parameters:   - apply_to: city    listen: f2  - apply_to: top_config    listen: f3- row_id: F  type: metric  metric: ga.screen_page_views.by.event_created_at  parameters:   - apply_to: city    fractions:    - logic: OR      type: contains      controls:      - input: value_input        value: a  - apply_to: top_config    fractions:    - controls:      - selector: ga_property        value: 123123123      - date_picker: start_date        value: $METRICS_DATE_FROM      - date_picker: end_date        value: $METRICS_DATE_TO- row_id: G  type: formula  formula: ($C + $E) / 2  name: 'name in UI'options:  series:   - data_row_id: C    y_axis_index: 0    type: 'line'

Reference

Report Constants

$METRICS_DATE_FROM and $METRICS_DATE_TO are intended for use by Store Models. Their values are provided based on the time filter set by the user for a specific query.

Report

NameTypeDefaultDescription
report*string-Report name
titlestring-Dashboard title in UI
access_rolesstring []-If specified, only users with the listed roles will have access to Report
parametersTop Filter []-Begin a section of report parameters
rowsRow []-Begin a section of rows
optionsTile Options-Report options schema is the same as dashboard tile options schema

Row

NameTypeDefaultDescription
row_id*string-Row Id
type*enum-Row type:
  • metric
  • formula
  • header
  • empty
metric**string-metric_id. Required for row type Metric.
formula**string-PostgresSQL SQL formula for calculating row data using $ROW_ID references to other rows (simple math operations). Required for row type Formula.
name**string-Row name. Required for row type Formula or Header.
show_chartbooleanfalseShow row data on chart
format_numberstring-Format Number
currency_prefixstring-Format Number - Symbol
currency_suffixstring-Format Number - Symbol
parametersRow Parameter []-Begin a section of row parameters

Row Parameter

Row parameter must have conditions, listen or fractions.

NameTypeDefaultDescription
apply_to*string-Field or Filter name
listenstring-Specify report parameter to listen to
conditionsstring []-for parameters mapped to Model
List of filter expressions
fractionsFraction []-for parameters mapped to Store
List of fractions

On this page