Codex Now vs Then
ChartAn animated dumbbell chart — compare current vs baseline with variance badges.
Styles
5 stylings shipped — every one is a real render, in your theme.
Overview
See the shift. Feel the impact. Codex Now vs Then renders a dumbbell chart — one dot for the baseline, one for current — connected by a line that shows direction and magnitude. Variance badges on the right show improvement or regression, colour-coded by direction.
Ideal For
- Before/after reporting — pre- and post-initiative performance
- Period comparisons — this month vs last month, this year vs last year
- Go-live dashboards — post-implementation metrics vs pre-implementation baseline
- Executive presentations where you need to show movement, not just a number
Key Features
- Dumbbell connector from 'Then' dot to 'Now' dot with animated reveal
- Colour-coded variance badge — green for improvement, red for regression
- Direction awareness — configure 'upIsGood' or 'downIsGood' per metric
- Format hint per metric — currency, percentage, or number formatting
- Sort order field well — arrange metrics in any meaningful sequence
- Staggered entrance animation — metrics animate in sequence (~200ms delay)
- Hover tooltip showing metric name, Now value, Then value, and variance
- Click a row to cross-filter other visuals on the page
Set Direction to 'downIsGood' for metrics like cost, error rate, or response time so the variance badge correctly colours a decrease as green.
Help guide
What goes in each field
| Field well | Put in | Required | What it does |
|---|---|---|---|
| Category | Column | Yes | One row per value, usually the name of each metric. |
| Now Value | Measure | Yes | The current reading, drawn as the "now" dot. |
| Then Value | Measure | Yes | The baseline reading, drawn as the "then" dot. A row with a blank Now or Then value is skipped. |
| Format | Measure | No | Text that sets how each row's numbers are written: number, currency or percent, in lower case. Rows without it use the Value Format setting. |
| Direction | Measure | No | Text that sets which way is good for each row. downIsGood makes a fall green. Anything else, or blank, means up is good. |
| Sort Order | Measure | No | A number that sets the row order, smallest first. Rows without one go to the bottom. |
| Target Range Low | Measure | No | The lower edge of a shaded target band on each row. |
| Target Range High | Measure | No | The upper edge of the target band. The band only draws when both edges have a value. |
Build the measures
The examples assume a Sales table related to a marked date table called 'Date', with three existing measures: [Revenue], [Order Count] and [Return Rate] (a fraction, such as 0.04). Swap in your own names.
Each row is a different metric, so start with a small table of metric names (Home → Enter data) called Metric, with these columns:
| Metric | Order | Format | Direction |
|---|---|---|---|
| Revenue | 1 | currency | upIsGood |
| Orders | 2 | number | upIsGood |
| Return Rate | 3 | percent | downIsGood |
Do not relate it to any other table.
Now Value: pick the measure for each metric row
Now Value =
SWITCH (
SELECTEDVALUE ( 'Metric'[Metric] ),
"Revenue", [Revenue],
"Orders", [Order Count],
"Return Rate", [Return Rate] * 100
)
Percent rows are written as the number plus a "%" sign, with no conversion. That is why the return rate is multiplied by 100: 4.2 shows as "4.2%", while 0.042 would show as "0.042%".
Then Value: the same metric a year earlier
Then Value =
CALCULATE ( [Now Value], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
Format, Direction and Sort Order: read them from the metric table
Metric Format =
SELECTEDVALUE ( 'Metric'[Format] )
Metric Direction =
SELECTEDVALUE ( 'Metric'[Direction] )
Metric Sort =
SELECTEDVALUE ( 'Metric'[Order] )
Format and Direction must be measures. A text column dropped straight into these wells is counted, not read, so the visual gets a number instead of the word.
Put it together
- Add the visual and drag Metric[Metric] into Category.
- Drag Now Value into Now Value and Then Value into Then Value.
- Drag Metric Format into Format, Metric Direction into Direction and Metric Sort into Sort Order.
- In the Format pane, open Comparison and set Variance Format to Percentage, Absolute or Both.
- Because each metric has its own scale, open Axis and set Axis Mode to Independent per category.
Tips
- The words are matched exactly.
Percentordown is goodare not recognised: a capitalised format is written as a plain number, and an unrecognised direction counts as up is good. - Currency rows always use a "$" sign.
- When the Then value is zero and the Now value is not, there is no percentage change to show, so the badge shows a dash.
- On a percent row, Absolute variance is shown in percentage points, with a "pp" suffix.
- Show Target Range in the Axis card is on by default, so the band appears as soon as both target fields return a value.
Billed through Microsoft AppSource