Executive KPI card: sales and growth in one line with FORMAT

Build a report-ready KPI sentence that combines sales, a signed year-over-year percentage and a fallback when there is no prior year.

You will learn to

  • Format numbers inside text with FORMAT
  • Add a plus sign to positive changes
  • Handle the case where the comparison is missing

How it works

A card that reads "$179,809 (+34.4% vs last year)" tells an executive more than two separate numbers. It is built from pieces joined with `&`: formatted sales, a signed percentage, and words.

`FORMAT(value, "$#,##0")` gives whole dollars with thousands separators; `FORMAT(value, "0.0%")` gives a percentage with one decimal. A negative number keeps its minus sign, but a positive one has no plus sign, so add it yourself: `IF(change >= 0, "+", "")`. (FORMAT can also do it with a two-part pattern, one part for positives and one for negatives: `"+0.0%;-0.0%"`. Either way is accepted.)

Plan for the missing case. In 2024 there is no previous year, so the change is blank, and the text would read "( vs last year)". Test the comparison with `ISBLANK` and say "no prior year" instead. Variables keep each piece computed once.

Practice it hands-on with a real data model and a live report that updates as you type.

Orders Card =
VAR orders = [Order Lines]
RETURN FORMAT(orders, "#,##0") & " order lines"