In Power BI, when working with calculation groups, they will often need to be recalculated when certain changes are made.

You will end up with this error message if you use a calculation group that’s been changed in your Power Bi Report:

The query referenced Calculation Group Table ‘Calculation Group’ which does not hold any data because it needs to be recalculated or refreshed.

 

Thankfully, the solution to this error is quite simple even though it’s not obvious what to do.

 


 

Firstly, we’ll need to install DAX Studio and have it connect to your data model.

Next, copy this code into DAX Studio:

 

{
    “refresh”: {
        “type”: “calculate”,
        “objects”: [
            {
                “database”: “INSERT DATABASE NAME”
            }
        ]
    }
}

 

Like below:

Note: Replace INSERT DATABASE NAME with the name of the database your calculation group is stored in.
Keep the double quotes as well!

 

Run this code and it should error.

However, it has still done what we want it to do, which is too just recalculate our objects.

 

Go back into your Power BI file and refresh your visuals and everything should now be working!

 

Hope this helps!

Tags: