Forum Discussion
adding variance into table
- 1 year ago
Hi topazz11
Instead of adding extra rows to your data and potentially slow down refresh and increase your semantic model's footprint, use calculation groups instead so the same logic is applied to the measures added to a visual. Please see the attached sample pbix.
Hi topazz11
If your goal is to display Current, Prior, and Variance on the same page and switch between them dynamically using a slicer, then the cleanest and most scalable solution is to use Calculation Groups via Tabular Editor. This lets you define one set of logic for your measures, and simply toggle between views without duplicating data or adding extra rows.
It keeps your model lean, improves performance, and gives end users a smooth slicer-based experience.
That said, if you still need to physically calculate variance rows (for audit, export, or other use cases), you can absolutely do that by:
-
Grouping by a common key (like name + group),
-
Joining current and prior rows in Power Query or DAX, and
-
Calculating the variance as Current - Prior.
- topazz111 year agoHelper III
yes, please guide me.