Creating a standard calculated attribute

Plan requirement

Subscription Suite Professional or higher, Explore Professional or higher
Access Admin

A calculated attribute is a category you define, grouping values into something your business uses. You build it from a report rather than from a cloned dataset.

Create one

  1. Create or open a report in Explore.
  2. Click the Calculations menu icon and select Standard calculated attribute.
  3. Give it a descriptive name, avoiding quotation marks.
  4. Write the rule in the Formula field. Fields > Select a field and Functions > Add insert the right names for you, which is worth using rather than typing them.
  5. Set anything you need under Computed from, then click Save.

Once saved it behaves like any default attribute and is available to every report on the same dataset.

The shape of the rule

Conditions are chained with ELIF and closed with ENDIF:

IF (condition) THEN value ELIF (condition) THEN value ELSE value ENDIF

A real one looks like IF ([Ticket channel]="Email") THEN [Ticket ID] ENDIF. The ELSE value is what you get when none of the conditions are true.

Do not put a calculated metric inside it

This one is documented and easy to walk into. You can select standard calculated metrics from the list, but doing so can lead to inaccurate results and is not supported. Use only default metrics inside a standard calculated attribute.

It does not fail, which is the problem. It returns a number.

A worked example

Twenty products in a drop-down, and the business talks about four families. A calculated attribute maps each product to its family, and every report can then group by family.

Without it, every report repeats the same twenty-way grouping and somebody adds up the columns by hand.

Always include an else

Whatever the rule does not cover has to land somewhere named, such as "Other". Without it those tickets get an empty value and quietly disappear from grouped reports.

Then watch the size of Other

If it grows, something new is not covered, usually a product added after you wrote the rule. That is the maintenance signal for this kind of calculation.

The limits you are working inside

Calculations nest 3 levels deep, and the recommended maximum is 200 conditions per formula. A rule approaching either is a sign the categorisation belongs in a field on the ticket rather than in a formula.

Name the categories as the business says them

Reports speak the language of the people reading them. If the categories need translating in the meeting, they are the wrong categories.

Values matter, not labels

Write the rule against the stored values of a field rather than its display labels where they differ, because labels can be edited without anybody thinking about reporting.

Test on known tickets

Take five tickets whose category you know and check where they land. A rule with an ordering mistake assigns plausibly and wrongly.

See also

Was this article helpful?

0

Still stuck?

Our support team will take a look with you.

Comments

0 comments

Article is closed for comments.