pbPassingBI
/

How to use group in calculated field?

intermediate
Answer

An ad-hoc group created by selecting marks and clicking the paperclip cannot be referenced in a calculation. To use grouping inside a calculated field you need the group to exist as a field.

Two ways to get there. Create the group properly in the Data pane — right-click the dimension → Create → Group — which produces a new field you can reference by name like any other.

Or write the grouping in the calculation itself, which is often clearer and easier to maintain:

`CASE [Region] WHEN 'East' THEN 'Domestic' WHEN 'West' THEN 'Domestic' ELSE 'International' END`

The calculated version has the advantage of being visible in the workbook rather than buried in a group definition, and it can be edited without touching the Data pane.

Related questions