Implementing Extended Syntax Keywords

Objective

After completing this lesson, you will be able to implement extended syntax keywords in a Web Intelligence document.

Extended Syntax Keywords

You can use extended syntax keywords as shorthand to refer to dimensions without listing each dimension. This helps future-proof reports. If formulas do not contain hard-coded references to dimensions, they will continue to work, even if dimensions are added to or removed from a report.

There are five extended syntax keywords: Body, Block, Break, Report, and Section.

The Body Keyword

The Body keyword refers to different dimensions based on its placement in a report.

PlacementData Reference
A blockData in the block
A block break (header or footer)Data in the block
A section (header, footer, or outside a block)Data in the section
Outside any blocks or sectionsData in the report

Example

Table with columns Year, Quarter, Sales revenue, Body, where Sum([Sales revenue]) In Body displays sales by quarter and by year.

The report shows year, quarter, and sales revenue, with a break on year.

The Body column uses this formula:

=Sum([Sales revenue]) In Body

The totals in the Body column match the totals in the Sales Revenue column. The Body keyword refers to the data in the block. If you add the month object, the figures in the Body column change to match the updated figures in the Sales Revenue column. If you place the formula in the report footer, it returns the total revenue for the body.

Note

You do not need to specify Sum because the sales revenue measure uses Sum as its aggregation function.

The Block Keyword

The following table shows which dimensions the Block keyword references based on its placement in your report. The Block keyword often includes the same data as the Section keyword. However, Block applies filters set on a block, while Section does not.

PlacementData Reference
A blockData in the whole block, ignoring breaks, respecting filters
A block break (header or footer)Data in the whole block, ignoring breaks, respecting filters
A section (header, footer, or outside a block)Not applicable
Outside any blocks or sectionsNot applicable

Example

Two tables compare 2024 and 2025 quarterly sales revenue and averages, with a highlighted formula calculating the first half average as =Average([Sales revenue]) in Block.

In this example, you have a report that shows the year, quarter, and sales revenue. The report includes a section based on year. The block is filtered to exclude the third and fourth quarters.

The First Half Average column uses this formula:

=Average([Sales revenue]) In Block

The Block keyword applies the filter to the calculation in the column.

The Break Keyword

The Break keyword refers to different dimensions based on its placement in a report.

PlacementData Reference
A blockData in the part of the block delimited by a break
A block break (header or footer)Data in the part of the block delimited by a break
A section (header, footer, or outside a block)Not applicable
Outside any blocks or sectionsNot applicable

Example

A yellow callout highlights the formula =Sum([Sales revenue]) In Break beneath two tables summarizing quarterly and yearly sales revenue and break totals for 2024 and 2025.

For example, you have a report showing year, quarter, and sales revenue. The report has break on year.

The Break Total column uses this formula:

=Sum([Sales revenue]) In Break

Without the Break keyword, this column duplicates the figures in the Sales Revenue column. It uses the default output context, which is year and quarter.

Note

You do not need to specify Sum because the sales revenue measure uses Sum as its aggregation function.

The Section Keyword

The Section keyword refers to different dimensions based on its placement in a report.

PlacementData Reference
A blockAll data in the section
A block break (header or footer)All data in the section
A section (header, footer, or outside a block)All data in the section
Outside any blocks or sectionsNot applicable

Example

Section totals for each year use the formula =Sum([Sales revenue]) In Section to calculate annual sales revenue from quarterly data.

For example, you have a report that shows year, quarter, and sales revenue. The report includes a section based on year.

The Section Total column uses the formula:

=Sum([Sales revenue]) In Section

The value in the Section Total column shows the total revenue for each year. This is because the section break is set on the year object. Without the Section keyword, this column would repeat the figures from the Sales Revenue column. It would use the default output context year and quarter.

Note

You do not need to specify Sum because the sales revenue measure uses Sum as its aggregation function.

The Report Keyword

The Report keyword refers to different dimensions based on its placement in a report.

PlacementData Reference
A blockAll data in the report
A block break (header or footer)All data in the report
A section (header, footer, or outside a block)All data in the report
Outside any blocks or sectionsAll data in the report

Example

A table lists quarterly sales revenue for 2024 and 2025, with a bolded sum of $21,328,370 and a formula: =Sum([Sales revenue]) In Report.

In this example, you have a report that shows year, quarter, and sales revenue. The report includes a column called Report Total, which displays the total sales revenue for the entire report.

The Report Total column uses this formula:

=Sum([Sales revenue]) In Report

Without the Report keyword, this column would duplicate the figures in the Sales Revenue column because it would use the default output context year and quarter.

Note

You do not need to specify Sum because the sales revenue measure uses Sum as its aggregation function.

Let's Summarize What You've Learned

  • Extended syntax keywords let you reference report data without hard-coding dimensions, making reports more flexible and future-proof.
  • The Body, Block, Break, Section, and Report keywords each refer to different data scopes within a report.
  • Using these keywords helps formulas adapt automatically when report structures or filters change.
  • Each keyword’s effect depends on its placement in the report, impacting the data returned by formulas.

Implement Extended Syntax Keywords

Business Example

Your manager asks you to create a report that identifies all stores performing above the company-wide average. They plan to use this list to learn from high-achieving locations and apply their successful strategies elsewhere. By highlighting these top-performing stores, you will provide a clear visual tool for management to quickly spot them.