In the end of this part your users type forecast values into the grid, click Save, and the values come back after a refresh, stored in the app’s own database in whole euros.
Time: about 15 minutes of testing and polish (the saving itself was already built in Part 4).
Credits: one small polish prompt.
This is the moment Fabric Apps stop being „a report with extra steps“. For years we’ve answered „can I enter my forecast in Power BI?“ with workarounds: Excel uploads, SharePoint lists, Power Apps visuals. Here, writing back is a built-in part of the app.
Where do the values go?
A semantic model can’t store user input. So the app has its own database: a SQL database in Fabric that Rayfin creates for you. You never write SQL. You (or Copilot) describe an entity in TypeScript, for example ForecastEntry with region, product group, month and amount, and Rayfin creates the table, an API and the access rules from it.
The architecture in one sentence: actuals and the forecast suggestion come read-only from the semantic model via DAX; the forecast values users enter go to the app’s database.
Two things I find exciting as a BI person:
- The app database is mirrored to OneLake. That means you can build a Power BI report on the saved forecasts: plan versus actual, without exports.
- You can see every saved record in the Fabric portal: open the app → Manage → SQL database.
In your workspace, the app’s database is its own item with the app’s name and a database icon. Under dbo → Tables you find what Rayfin created from the code: ForecastEntries, Scenarios (Part 6) and Users. Click a table for a data preview. Look, but don’t change the schema here: the orange banner warns that this can break the app. (I’ve greyed out the user ID and email columns.)
Stumbling block: one evening, every SQL view in the portal (this database, its SQL analytics endpoint and a lakehouse) failed with „NetworkError / Failed to fetch“ and a red mark at Schemas. The next morning everything worked again; the app itself kept saving the whole time. If it happens to you: wait, refresh, or try an InPrivate window.
Copilot applies database changes with npx rayfin up –exclude-services staticHosting: backend only, user interface not yet published. When it asks for permission, that’s the command you’re confirming.
Test saving
You do:
5a. Open the Fabric portal in your browser, go to your workspace and click the app item (the one named forecast-app) to open it. With the SDK route from Part 4, the app only works there, not on localhost.
5b. In the grid, click into a Forecast field, type a new value (for example 250000) and press Tab. Change two or three values.
5c. Click Save forecast.
5d. Refresh the browser page (F5).
Checkpoint: your values come back, and the Save button is grey again (no unsaved changes). The chart shows your values for the forecast months instead of the suggestion.
Commit point: in VS Code, click Source Control (branch icon on the left), type Forecast saving works into the message field, click Commit.
Polish: planners don’t forecast to the cent
My first version pre-filled the inputs with raw DAX results, like 194549,59413710926, in the browser’s number format, while the display columns used English format. Nobody plans like that.
You do:
5e. Open the Copilot chat (chat icon at the top right, or Ctrl + Alt + I), click + for a new chat and check that Agent is selected below the input field.
5f. Paste the prompt below and press Enter. When Copilot asks to run a command, read it and click Allow.
5g. When it’s done, refresh the app in Fabric and check: whole euros everywhere, same number format in display and input.
Prompt for your AI:
Small polish for the forecast grid, no changes to DAX, measures or the ForecastEntry logic:
1. Round the pre-filled forecast inputs to whole euros, and round entered values to whole euros when saving. Forecasts in this app are planned in whole euros.
2. Use one consistent number format in the whole app: English (en-US) with thousand separators, both in display columns and in input fields, including while editing.
Run the tests, deploy with npx rayfin up, and end without further review loops.
„No changes to DAX, measures or …“ is my standard fence. Small prompts with a clear boundary are cheap and safe.
Stumbling block: check Copilot’s summary for the word „deployed“. In my run it changed the code but didn’t run npx rayfin up. If it’s missing, click into the terminal at the bottom, type npx rayfin up, press Enter and wait 2–5 minutes. Then refresh the app.
Stumbling block: one of the template’s own tests (the visual validator) failed independently of our changes. You can ignore it; it needs the Azure CLI, which we don’t use.
What the demo doesn’t do yet
Two things I noticed while testing that a customer project needs:
- No plausibility check. I typed 70 instead of 70,000 and it was saved without a warning. Production needs a warning for implausible entries and a clearly labeled unit (euros or k€).
- Last write wins. If two people edit the same cell, the later save overwrites the earlier one silently.
Both are on the checklist in Part 10.
Commit point: Source Control → message Grid polish: whole euros, en-US format → Commit.
Fabric Apps is in preview; menus and commands may change. Written October 2026. Co-authored with Claude as co-learner. Previous: Part 4 · Next: Part 6. #HumanAICoProgramming