hardiksri's avatar
hardiksri
Advocate I
1 month ago

Generic Commentary Writeback in Power BI using Fabric User Data Functions

Business users often need to explain why a number changed, not just view the number.

 

These explanations usually end up in Excel, emails, Teams messages, or PowerPoint and become disconnected from the actual Power BI report context.

 

I built a generic commentary writeback framework using Microsoft Fabric User Data Functions.

The idea is simple:

Selected business context + metric + period = one unique comment context.

 

A user can select a period and metric, choose a row in a matrix or use report slicers, enter a comment, and save it directly from Power BI.

For example:

🎯Target achieved at 104.5% — performance is above plan due to stronger volume and improved customer mix.

What makes it generic?

Instead of hardcoding Cost Center, Profit Center, Customer, Material, and every other dimension into the writeback function, Power BI dynamically creates a grain key from the current report context.

This means the same framework can support commentary at different levels, such as Cost Center + Profit Center or Cost Center + Profit Center + Material, without redesigning the writeback function for every combination.

Versioning and audit

Comments are stored in a versioned backend table. Every insert, update, or delete creates a new version.

A latest-comment view returns only the current active comment to Power BI, while the complete history remains available for audit and traceability.

I used Databricks as the backend for this demo, but the same design can be extended to Fabric Warehouse, Azure SQL, or another suitable SQL-based storage layer.

Why I built this

The goal was to bring business commentary closer to the data itself and make explanations contextual, reusable, and auditable.

This pattern can be useful for finance variance commentary, forecast assumptions, sales performance notes, planning annotations, and other enterprise reporting scenarios.

The most interesting part for me was using Fabric User Data Functions with Power BI Translytical Task Flows to turn a report from a read-only analytical experience into an actionable workflow.

 

Would love to hear how others are approaching commentary and writeback scenarios in Power BI and Microsoft Fabric.

 

slindsay Praful_Potphode tharunkumarRTK Natarajan_M 

No RepliesBe the first to reply