[Part 8] Making it speak IBCS [Fabric App]

At the end of this part every visual in the app follows IBCS notation: actuals solid, prior year light grey, forecasts hatched, labeled columns instead of a line, variances as bars and a pin chart.

Time: about 40 minutes for three rounds, plus about 50 minutes of polish, including a pin chart you fix by hand at the end.

Credits: the whole IBCS phase used about 19 percentage points of my monthly allowance, the most expensive part of the build.

In Part 6 I needed a ruler to see a 25 kEUR difference in a line chart. IBCS fixes that: you read values from labels, and variances get their own chart. Many of us already use IBCS in Power BI with Zebra BI or Deneb, so this is familiar ground.

A nice surprise: the app’s charts are Vega-Lite, the same language as the Power BI custom visual Deneb. If you know Deneb, you can read and hand-edit these charts.


One separate step, on purpose

You do:

8a. Commit first: Source Control (branch icon on the left) → message Scenario fixes working → Commit. If the styling breaks something, you can trace it to one change and roll it back with one commit.

8b. Open the Copilot chat (Ctrl + Alt + I), click + for a new chat, check that Agent is selected.

8c. Paste the prompt below, press Enter, click Allow when Copilot asks to run commands.

8d. When Copilot says it deployed, open the app in the Fabric portal and refresh (F5). Look at the normal view first, then switch to the compare view.


The prompt

This is the final version, including everything I learned in three rounds. Put all visual requirements into the first prompt: iterating on visuals is expensive.

Prompt for your AI:

Restyle all visuals according to IBCS (International Business Communication Standards). Keep all data logic, DAX queries, scenarios and permissions unchanged.

- Scenario notation: Actual (AC) solid dark grey, Previous Year (PY) solid light grey, forecast scenarios (FC) hatched dark grey. A Final scenario keeps the hatching with a solid outline. Use the notation consistently in charts, legends and the compare view, with the scenario name next to the abbreviation (e.g. "FC Base"). In tables and the grid, keep cells plain with no fills or hatching; show the notation only as a small marker bar under each column header.
- Time series: replace the line chart with a column chart, months on the horizontal axis, AC for past months and FC of the selected scenario for forecast months in one series, PY as a slightly offset light grey column behind. Forecast months show one aggregated, diagonally hatched column per month, never stacked segments. Label only the main column per month (AC or FC) in kEUR, not PY; remove the y-axis and gridlines, and leave headroom so no label is cut off.
- Compare view: per region and product group, show the absolute variance (second scenario minus first) as horizontal bars and the relative variance as a pin chart. Positive in green, negative in red; use color only for variances.
- Structure comparisons (regions, product groups) as horizontal bars, sorted by value.
- Titles state the message: entity, measure, unit, scenario and period, e.g. "Sales in kEUR, Jan 2025 – Dec 2026, AC / FC Base".
- Units: charts in kEUR without decimals; the grid inputs stay in whole euros.
- No 3D, no shadows, no decorative colors, no pie or donut charts.
Add render tests that use sample data in exactly the shape the DAX queries return, not just spec compilation.
Deploy with npx rayfin up and confirm the deployment.

What went wrong first (so it won’t for you)

Round 1: IBCS taken too literally. Hatched and dark-filled table cells made numbers unreadable, forecast columns came out as 20 stacked segments, AC and PY labels overlapped, and the y-axis title said „Sales“ several times. The prompt above already contains the corrections: plain cells with a marker bar, one aggregated column, labels only on the main series.

Artikelinhalte
Artikelinhalte

My first IBCS try, honestly ugly. Top: hatched and dark cells, so you can hardly read the forecast you’re supposed to type in. Bottom: each forecast month built from stacked segments, AC and PY labels on top of each other, and „Sales, Sales, Sales…“ on the y-axis.

Round 2: „It compiles“ is not „it works“. The x-axis showed „NaN“ instead of months, and the relative variance chart crashed with a JavaScript error, although Copilot reported that the chart specs compiled. Compiling only checks syntax. The real cause: the DAX queries return dates as ISO strings in a shape the specs didn’t expect. Asking for render tests with sample data in exactly the shape the DAX queries return reproduced both failures and fixed them in one run. I now add that line to every chart prompt.

Round 3: hatching inside Fabric. SVG patterns for the hatching didn’t render inside the Fabric iframe. Copilot fixed it by drawing the diagonal lines as marks. A narrow fix like this in a fresh chat cost me about 1 credit point.

Checkpoint: in Fabric, check both the normal view and the compare view after every chart change. In compare mode my labels ran into each other once, which a second narrow prompt fixed (again about 1 point).


Fix small things by hand

Because the charts are Vega-Lite files (*.json), label positions, colors, number formats and axes are often a few lines. Try them in the Vega editor (vega.github.io/editor) with sample data, then npm test, npx rayfin up, commit.

Hand edits cost no credits!

Commit point: Source Control → message IBCS complete → Commit.


Your hands-on polish: the pin chart

Time to use what you learned in Part 7 on the live app, no prompt needed. Check that you are on main: git branch –show-current answers main.

Artikelinhalte

In my IBCS compare view, the pin chart’s axis showed decimals like 0.02 instead of 2 %. I opened relative-variance.json and found: the axis already says „format“: „.0%“. So the JSON isn’t the problem.


Detective work: who overrides my format?

Quick note from Kathrin: I have to admit, Claude ran a bit wild here. It wanted to know exactly where the problem was, and I just followed its lead. 🤣

Ctrl + Shift + F searches all files. Searching for relative-variance led to scenario-comparison.ts, which describes the data columns:

name: "relativeVariance",
format: "0.0%",
semanticType: "Percentage",

Every column carries a format string and a semantic type, and the Fabric visuals library formats numbers from these. That’s pure Power BI logic: the format string on a measure in the model wins over the visual. Two layers decide the look: the chart spec (JSON) and the data’s metadata (TypeScript).


The fix: labels instead of an axis

The decimals come from inside that library, which we don’t edit. So I chose a cleaner fix that is also more correct for IBCS: no axis on the pin chart. Every pin already carries its label.

You do: in relative-variance.json, Ctrl + H (Find & Replace), find „axis“: { „title“: „Δ Sales (%)“, „format“: „.0%“ }, replace with „axis“: null, Replace All (the second button). 3 replacements.

Without the axis, the pins looked like they were floating. So I added a dotted zero line. Here’s the block that replaces the first layer:

{
  "mark": { "type": "rule", "color": "#555555", "strokeWidth": 1, "strokeDash": [4, 3] },
  "encoding": {
    "x": { "datum": 0, "type": "quantitative", "axis": null },
    "y": { "value": 0 },
    "y2": { "value": "height" }
  }
},

IBCS usually draws the zero line solid; dotted is my design choice. That’s the kind of decision we BI people make, not the AI.


The red test that helped

npm test — scenario-comparison: 1 failed. The test expected an axis label „0%“, which we removed on purpose. A red test isn’t always a bug; sometimes it’s the test noticing your design decision. So I updated the test to describe the new design:

expect(relative.svg).not.toContain("X-axis");
expect(relative.svg).toContain('stroke-dasharray="4,3"');

And the test output explained something I had only felt: the old zero line was drawn as four lines of zero length. It inherited the region axis and drew one tiny line per row. That’s why the pins floated: there never was a visible zero line. The y/y2 lines fix that.

All 4 tests green, commit Pin chart: labels instead of axis, dotted full-height zero line, npx rayfin up. Refresh the app in Fabric and look at the compare view.

Artikelinhalte

Right: the pin chart after the fix, with labels instead of an axis and a dotted zero line from top to bottom. Left: the absolute chart, which is your homework now 😉


Your turn – Homework

Look at the absolute variance chart next to the pin chart: it still has an axis, although every bar is labeled, and it has no zero line. Apply the same two changes to absolute-variance.json. Bonus: IBCS prefers square bars; find out where the rounded corners come from.


Fabric Apps is in preview; menus and commands may change. Written October 2026. Co-authored with Claude as co-learner. Previous: Part 7 · Next: Part 9. #HumanAICoProgramming

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert