Skip to main content
IMPLEMENTED

Calculation groups in SSAS Tabular

  • February 27, 2020
  • 10 replies
  • 76 views

andri
Contributor
Forum|alt.badge.img+1

Since SQL Server 2019 a new feature called calculation groups has been added. Calculation groups help with the reusability of calculations in models, for example, to simplify time calculations.

10 replies

Forum|alt.badge.img

I feel I need to emphasize how important this is for a mature enterprise solution.  It's very reasonable for someone to want year to date, quarter to date, month to date, previous year, previous month, previous week, year over year, month over month, and week over week - for almost every single measure.  

Without calculation groups, that means that for every measure you want to analyze, you must actually create ten distinct measures.  In other words, not having calculation groups means doing, at minimum, ten times the amount of work for every measure, along with associated problems maintaining those measures.  In addition, you also have to figure out how to display all of those extra measures to the end user.  

I know this is a newer feature in SSAS, but I feel it is a very important one that could easily make the difference between a client choosing to use TimeXtender to build their Tabular models and building their models manually.


  • Explorer
  • August 5, 2020

Calculation Groups are a must have!  We have one model that already has close to 200 measures, and a request just came in to add 190 more for Time Intelligence.

If we were able to create Calculation Groups, we could eliminate over 60% of the measures (Custom DAX) from the model with the creation of a handful of Calculation Items.

 


  • Starter
  • March 7, 2021

Is there any update on adding this feature? 


fwagner
Employee
Forum|alt.badge.img+4
  • Employee
  • March 31, 2022

Hi all,

to cover requirements similar to calculation groups (before they existed) in enterprise scenarios, I created this script/approach with measure templates and TabularEditor:

https://github.com/datadu-de/MeasureMagic

It can be integrated pretty easily into your CI/CD pipeline for a model and executed against a .bim file but also against a deployed model.


fwagner
Employee
Forum|alt.badge.img+4
  • Employee
  • February 13, 2023

Hi all,

Microsoft has released a feature called “DirectQuery on PBI data sets and AS” - it is still in Preview, but it allows the usage of calculation groups on TimeXtender models.

We have compiled a TimeXtender Tuesdays episode on how to set it up:

 

Please let us know if that works in your situation.


fwagner
Employee
Forum|alt.badge.img+4
  • Employee
  • February 13, 2023

This discussion may also be interesting to you: 

 


rvgfox
Problem Solver
Forum|alt.badge.img+4
  • Problem Solver
  • February 14, 2023

Hi @fwagner, perphaps you know it, but in:

Time Intelligence with calculation groups script

you have a very nice C# script to create a time intelligence calculation groups with a few clicks.

In this post you have how can use it: 

https://www.esbrina-ba.com/one-click-calculation-groups-for-your-toolbelt/


fwagner
Employee
Forum|alt.badge.img+4
  • Employee
  • February 14, 2023

@rvgfox thank you!

I did not know about that script.

But the C# automation is really handy indeed for bigger models!

Some time ago I made a similar C# script for Tabular Editor, that uses XML-based template files to create Time Intelligence (or whatever else you put in the templates) based on however many base measures:

https://github.com/datadu-de/MeasureMagic

It became obsolete to a degree with the release of calculation groups but can still be useful in some scenarios.


JTreadwell
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • January 9, 2024

Thanks for the ideas and votes folks, they continue to shape our product.

As of today, you can now add calculation groups to semantic models and deploy them to Tabular and PowerBI semantic endpoints!

This and more were release today in v6505.1. Read more about it here.

Keep the ideas and votes flowing!


JTreadwell
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • January 9, 2024
SUBMITTEDIMPLEMENTED