PT EN
Back to site

DATTA BI — Models and visual relationships

Crossing data from different sources used to require SQL, exports and a good deal of patience. With DATTA BI Models, you drag datasets as boxes onto a canvas and draw the relationships between them — the equivalent of the Power BI Desktop "Model view". Once that is done, the dashboard charts start filtering each other automatically. The relationships exist only in DATTA BI: they never change the original source.

How to access

Menu VisualizarModelos.

What you see on the canvas

  • Draggable dataset boxes showing the dataset and its columns.
  • Relationship lines with a cardinality indicator (1:1, 1:N, N:1, N:N) and the filter direction (unidirectional or bidirectional).
  • Preview: double-clicking a box opens a table with the dataset's first 100 rows, already with per-column DATTAX editing.

Creating a relationship by dragging

  1. Hover over the right edge of a dataset box — a blue connection anchor appears.
  2. Drag that anchor onto the other box.
  3. In the dialog that opens, fill in:
    • From column — the source column (the foreign key).
    • To column — the target column (the primary key).
    • Cardinality — 1:1, 1:N, N:1 or N:N.
    • DirectionBOTH (bidirectional cross-filter) or SINGLE.
  4. Confirm: the line is drawn on the canvas and the relationship is saved in the model.

Each relationship is stored with the model it belongs to, the source and target datasets, the linked columns, the cardinality, the direction and the active flag — all in the platform's BI database.

Automatic cross-filter

When two related datasets feed charts on the same dashboard and there is an active relationship between them, clicking a bar on chart A propagates the filter to chart B, following the relationship through a logical JOIN — with no extra configuration. See the cross-filter guide.

Calculated columns with DATTAX

In the dataset preview, click a column name: an editor opens where you write a custom DATTAX expression, for example:

UPPER(nome)
coalesce(municipio, "—")

The expression becomes a calculated column and is saved with the dataset, available in any chart.

Hands-on example — social assistance model

The demo data seed (seed-demo-data.sh) already creates four relationships in the dm-mds-assistencia model:

  1. Pessoa.familiaIdGrupoFamiliar.id (N:1, BOTH)
  2. BeneficioSocial.pessoaIdPessoa.id (N:1, BOTH)
  3. Transacao.beneficioIdBeneficioSocial.id (N:1, BOTH)
  4. ServicoPublico.ufPessoa.uf (N:N through uf, SINGLE)

The first three links are bidirectional (BOTH): cross-filtering between the charts that use those datasets works both ways. The fourth one is unidirectional (SINGLE) — the uf filter travels in one direction only, without propagating back.

Known limitations

  • No automatic key detection: you point out the source and target columns manually.
  • N:N does not create an automatic intermediate mapping table — when you need one, build an additional dataset.
  • Direction=BOTH can create a filter cycle if misconfigured; the interface warns you when it detects the risk.