ConradBI home

Home  /  How-to  /  Model your data

Build dimensions

Give your numbers the words people slice them by: one row per site, product or customer, ready for any fact to use.

The short version

  • A dimension holds the descriptions you group and filter by. Site holds Site Code, Site Name and Region, one row per site.
  • A Changing Dimension picks its columns from a grain and keeps one row for each different combination of them. Columns that change often move to a second dimension, made by Update Rapidly dimension.
  • A Static Dimension holds rows you type in. A junk dimension gathers a few small flags, such as Channel and Status, into one dimension.
  • A Role Playing Dimension reuses another dimension in a second role, such as the site an order ships from.
  • The Filter group keeps only the rows you want. Every dimension gets a key and an unknown member without you asking.
Back to How-to guides
In this guide
  1. What a dimension element is
  2. Before you start
  3. Build the Site dimension
  4. Slowly and rapidly changing columns
  5. Static Dimension: rows you type
  6. Junk dimensions: small flags together
  7. Role Playing Dimension: one dimension, two roles
  8. Keep only some rows: the Filter group
  9. True / False values
  10. When something goes wrong
  11. Reference

What a dimension element is

A dimension holds the descriptive columns of one thing, one row each. Your fact links each of its rows to a row of the dimension, and visuals group and filter the fact's numbers by the dimension's columns. If the idea is new, start with Star schema basics.

Dimensions live in the Dimensions group of the element list. There are six types:

Type Where its rows come from Use it for
Changing Dimension The columns you pick from a grain, one row per combination Site, Product, Customer
Static Dimension Rows you type in A short list that isn't in your data
Options Junk Dimension Every combination of the values of the columns you pick A few small flags
Scenario Junk Dimension The combinations that occur together in each source A few small flags, without combinations that never happen
Role Playing Dimension Another dimension's rows, under new names The same thing in a second role
Date Dimension A calendar it makes itself Dates. See Date dimensions

Whatever the type, ConradBI adds two things when the dimension is processed: a key that numbers each row, and the unknown member, an extra row with the key −1 and blank columns. A fact row whose code matches no row of the dimension points at the unknown member, so it still counts in every total. Star schema basics explains both.

Before you start

You need the Order Lines grain from Define the grain. Besides its measures, it carries these columns for the dimensions in this guide:

Dimension Columns in Order Lines
Site Site Code, Site Name, Region
Product Product Code, Product Name, Category
Customer Customer ID, Customer Name, Segment

Click Process all in the Services panel once, so the editors have data to show.

Build the Site dimension

This takes about five minutes.

  1. In the element list, click the + on the Dimensions row and pick Add Changing Dimension. In Add element, type Site in Name and click OK. The new dimension opens in the editor.
  2. Under Grain element, set Bind to grain: to Order Lines. Only grains are offered.
  3. Click Add column three times. In the three rows, pick Site Code, Site Name and Region under Column.
  4. Leave Alias as it fills in: the column's own name. Type another name here to rename the column in the dimension.
  5. Leave Type at Slowly Changing for all three.
  6. Leave Sort at A to Z unless the values should come in another order wherever they are grouped: by another column, as a month name sorts by its month number, or a Hu++ statement that returns a number, which you write under the row once you pick it. See Sorting a column's values.
  7. Save the dimension: ProjectSave, or Ctrl+S.
  8. In the Services panel, click Process current, then open the Data tab. There is one row per site, its key beside it, and one more row with the key −1 and blank columns: the unknown member.

Build Product the same way from Product Code, Product Name and Category, and Customer from Customer ID, Customer Name and Segment. Then the fact can join all three.

Tip: Always include the code, such as Site Code. It is the column the fact matches each order line on.

Slowly and rapidly changing columns

A Changing Dimension keeps one row for each different combination of its Slowly Changing columns found in the grain. For a site, that is one row per site, as long as each site has one name and one region.

That is also how it follows change. Say your order lines record the region a site was in on the day of the order, and one site moved from East to North during the year. Site then has two rows for that site, East and North, each with its own key. When the fact joins on Site Code and Region together, each order line keeps the version it was sold under, so last year's sales stay in East. Facts and measures shows that join.

A column that changes often would multiply the rows that way. Customer's Segment, if customers are moved between segments every month, is such a column. Set its Type to Rapidly Changing, and it moves to a dimension of its own:

Element Columns Made by
Customer Customer ID, Customer Name This editor
Customer Rapidly Segment The Update Rapidly dimension button

Each has its own key, and a fact joins each one separately: Customer on Customer ID, Customer Rapidly on Segment.

Sorting a column's values

Wherever a column's values are grouped — a chart's categories, a table's rows, a matrix's headers, a filter's list — they come in the order the dimension gives them. A to Z is the usual order: text as it reads, numbers and dates as they count. Pick by another column in the Sort column of the grid to order the values by that column's values instead: Month Name by Month, Size Name by Size Order. Pick Hu++ statement and a code box opens under the row: write a Hu++ value statement over the dimension's row, by the columns' aliases, that returns a number, such as CASE WHEN [Segment] = "Enterprise" THEN 1 WHEN [Segment] = "Mid-market" THEN 2 ELSE 3 END, and the values sort by it, smallest first. The Hu++ Accelerator beside the box writes the statement from plain words. The order applies after the next Process all, or the next time a visual loads the fact.

Update Rapidly dimension

The second dimension is an element of its own, a Changing Dimension (Rapidly), named after its parent with Rapidly at the end. Saving doesn't create it, change it or remove it. Only the button does.

A bar above the columns says where things stand:

The bar says It means
"No column is rapidly changing, so there is no Rapidly dimension." Nothing to do
"The Rapidly dimension is out of sync with this configuration." Your columns changed. The line under it says what the button will create, update or remove. Click Update Rapidly dimension
"The Rapidly dimension is in sync with this configuration." It matches the columns here

The Rapidly dimension can't be edited itself. Change its columns, or its filter, on the parent, then click Update Rapidly dimension again.

Static Dimension: rows you type

Some lists aren't in any source: a grouping your team uses, a sort order, a label for a code. A Static Dimension holds them. You define its columns and type its rows.

Say you want order statuses grouped and sorted:

Status Status Group Sort Order
Open In progress 1
Shipped Done 2
Cancelled Done 3
  1. Click the + on the Dimensions row, pick Add Static Dimension, name it Order Status and click OK.
  2. Under Columns, click Add column three times. New columns are called Column1, Column2 and so on: type Status, Status Group and Sort Order in Name.
  3. Pick each column's Type: Text for the first two, Number for Sort Order.
  4. Under Rows, click Add row and type the first row. Repeat for the others. To take a row out, select it and click Remove row.
  5. Save and process it.

The row grid follows each column's type. A True or False column offers True and False, a Date column a date picker, and a Date & Time column a date picker with a box for the time.

The rows come out exactly as typed, with a key and the unknown member added. A fact joins it like any other dimension, once Status is a Dimension column in the grain: Status in the grain to Status in Order Status.

Junk dimensions: small flags together

Channel has two values, Online and Store. Status has three. Columns like these are too small to be worth a dimension each. Kimball's answer is a junk dimension: one dimension that holds the combinations of several small flags, which the fact joins once.

Say you gather Channel and Status into one dimension called Order Profile. The fact then holds one key, Order Profile Key, instead of the two text columns, and visuals group by Channel and Status from the dimension.

In the running example Channel stays on the fact as a plain column, which works too. A junk dimension earns its place when there are several such flags, or when you want them shared by more than one fact.

ConradBI has two junk dimensions. They differ in which combinations they keep.

Options Junk Dimension: every combination

  1. Click the + on the Dimensions row, pick Add Options Junk Dimension, name it Order Profile and click OK.
  2. Click Add binding. In the new row, pick Order Lines under Element and Channel under Column. Only grains are offered.
  3. Click Add binding again and pick Order Lines and Status.
  4. To rename a column in the dimension, type the name under Override name. Leave it blank to keep the column's own name.

The dimension crosses the values of each column with every value of the others: 2 channels times 3 statuses gives 6 rows, whether or not each pair has ever happened. Each column's values are read on their own, even when both come from the same grain.

Scenario Junk Dimension: the combinations that happen

  1. Click the + on the Dimensions row, pick Add Scenario Junk Dimension, name it and click OK.
  2. Under Source data, click Add source and pick Order Lines under Element. Alias fills in with the element's name.
  3. Under Dimension columns, click Add column, pick the source under Source and Channel under Column. Add Status the same way.

Columns from the same source keep only the combinations that occur together in it. If no store order was ever cancelled, Store with Cancelled isn't a row. Columns from different sources are crossed, every combination of one with the other.

Pick the Options Junk Dimension when you want every combination ready, even one that hasn't happened yet. Pick the Scenario Junk Dimension to keep the dimension to real combinations, which matters once you have more than a few flags.

To use either, set Channel and Status to Dimension in the grain, then map both to Order Profile in the fact. Two columns mapped to one dimension make one join on both: see composite joins.

Role Playing Dimension: one dimension, two roles

Sometimes one fact needs the same dimension twice. Say some orders ship from a different site than the one that sold them, and Order Lines has a Ship Site Code column beside Site Code. Both are sites. A Role Playing Dimension gives Site a second role, Ship Site, with columns of its own.

  1. Click the + on the Dimensions row, pick Add Role Playing Dimension, name it Ship Site and click OK.
  2. Set Source dimension to Site.
  3. Type Ship in Role prefix. Under Columns to include, every column of Site is listed, ticked under Include, with an Alias (output name) made from the prefix and the column: Ship Site Code, Ship Site Name, Ship Region.
  4. Untick a column to leave it out, or type another alias.
  5. Save and process it. Process Site first: the role copies Site's rows.

The role keeps Site's keys, unknown member included, under its own column names. In the fact, map the grain's Ship Site Code to Ship Site, and its Site Code to Site. Visuals then offer Site Name and Ship Site Name side by side, so you can chart sales by the selling site and by the shipping site.

Tip: The fact could also map Ship Site Code to Site itself, as a second join. But visuals see one set of Site's columns for both joins and can't tell the two roles apart. A Role Playing Dimension keeps them apart.

The most common role is a second date: Ship Date as a role of Order Date. A role of a Date Dimension has a few settings of its own, covered in Date dimensions.

Keep only some rows: the Filter group

The Changing, Options Junk, Scenario Junk and Role Playing dimensions end in a Filter group. It narrows which rows the dimension keeps, the same way a visual's Filters tab narrows a visual. At its top, a line sums up what it does, such as "No filter: the dimension keeps every row."

By category

Click Add category filter, pick one of the dimension's columns, then pick how it narrows:

  • Values: click Load values and tick the values to keep. A row passes with any of them. Select all ticks or unticks every value shown, and Search narrows the list to the values containing your text. While you search, Add current selection to filter keeps the values you ticked before the search as well.
  • Like: the value contains the text you type. With [*] or [_] in it, it is a pattern instead: [*] stands for any run of characters and [_] for one.
  • Relative, for a date column: a window counted from today. Pick Last, Next or This, a number, and Days, Weeks, Months, Quarters or Years. This is the one today falls in.

Load values reads the values from processed data, so process the dimension, and what it reads, first. The ✕ on a filter removes it.

To keep only the eastern and western sites in Site, add a category filter on Region and tick East and West.

By Hu++

Under By Hu++, write one condition over the dimension's columns, each written [Column]:

Hu++
[Region] IN ("East", "West")

A row has to pass every category filter and the condition. The Hu++ guide explains conditions. If the condition has a problem, such as a column the dimension no longer has, the By Hu++ box says so, and the whole filter keeps every row until you fix it.

What the filter changes

The filter applies when the dimension is processed, so process the dimension, then the fact, after changing it.

  • A Changing Dimension filters the grain's rows before it builds either half, so its Rapidly dimension is built from the same rows. The filter can name any picked column, slowly or rapidly changing. Click Update Rapidly dimension after changing it.
  • A junk dimension filters the combinations it makes.
  • A Role Playing Dimension filters the rows it copies, by its own column names. It always keeps the unknown member.

A fact row whose dimension row was filtered out finds no match, so it joins the unknown member and shows under "(blank)". To leave rows out of the fact instead, filter them in the grain.

True / False values

A True or False column reads poorly on a chart. When a Changing, Options Junk or Scenario Junk dimension has one, a True / False values group appears in its editor, with a row for each such column. For a Changing Dimension, that is each Slowly Changing one.

Say Customer had a Key Account column holding True or False:

Column True value False value
Key Account Key account Other

Type the two words under True value and False value. When the dimension is processed, the column holds those words instead, as text. Leave both blank to keep the raw True and False.

A Basic Fact has the same group for its True or False degenerate columns: see Facts and measures.

When something goes wrong

What you see What to do
"The Rapidly dimension is out of sync with this configuration." Click Update Rapidly dimension. Saving doesn't update it
Bind to grain: doesn't list your prep A Changing Dimension reads a grain. Build a grain over the prep first: see Define the grain
The dimension has two rows for one site The site's columns differ between order lines, for example a name spelled two ways. Fix the spelling in a prep, or join the fact on every column of the dimension
"This dimension has no attributes yet: add its columns first." Add the dimension's columns before you add a filter
Load values finds no values The values come from processed data. Process the dimension, and what it reads, then click Load values again
Sales show under "(blank)" after you added a filter The filter dropped those rows, so their sales join the unknown member. Widen the filter, or filter the grain instead
The Options Junk Dimension has far more rows than expected It crosses every value of every column. Use a Scenario Junk Dimension to keep only combinations that occur
A Role Playing Dimension is empty or out of date It copies its source dimension's processed rows. Process the source dimension first, then the role

Reference

Type Main settings
Changing Dimension Bind to grain:, then Add column rows of Column, Alias and Type (Slowly Changing or Rapidly Changing). Update Rapidly dimension. True / False values. Filter
Changing Dimension (Rapidly) None of its own. Made and updated by its parent
Static Dimension Columns: Add column, Name, Type. Rows: Add row, Remove row
Options Junk Dimension Add binding rows of Element, Column and Override name. True / False values. Filter
Scenario Junk Dimension Source data: Add source, Element, Alias. Dimension columns: Add column, Source, Column. True / False values. Filter
Role Playing Dimension Source dimension, Role prefix, Columns to include with Include and Alias (output name). Filter. For a role of a date, Filter by date, Date format and Fiscal year starts: see Date dimensions
Date Dimension See Date dimensions

Missing something?

Tell us what you were trying to do and what this guide didn't answer. We update it with every release.

Write to us

What changed in this guide

  • November 21, 2026: Reviewed against ConradBI 1.2.59.
  • October 31, 2026: First edition, written for ConradBI 1.2.52.