cancel
Showing results for
Did you mean: Regular Visitor

## Fixed Calculations in PBI

I am converting a tableau workbook to PBI.

is there a way to perform a fixed calculation in PBI?

Below is the link to the fixed calculation function in Tableau.

1 ACCEPTED SOLUTION  Resident Rockstar

hi @jaydonguyen ,

When you say fixed calculation, you mean the result of a calculation doesn't change no matter what filter you choose? You can do something like:

``````calculation =
CALCULATE ( SUM ( Table[Column] ), ALL ( Table ), ALL ( Table2 ) )``````

This fixes the result of an expression regardless of the filters applied to the tables in the model that are included in the formula. Or you can just fix the calcuation for a particular column. The formula below removes any active filteres to Column2 but will be filtered if filters are applied to any other column.

``````calculation =
CALCULATE ( SUM ( Table[Column] ), ALL ( Table[Column2] ) )``````

There's a good read in sqlbi - https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept.... If you are new to this, though, it will take sometime to digest it.

"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
2 REPLIES 2  Community Support

Hi @jaydonguyen ,

If you need to keep a measure or column in a fixed value, you may use ALL function in the formula like DAX below. Otherwise, you can use ALLSELECTED function to take effect of any slicer or filter.

Measure1=CALCULATE(SUM(Sale[Sales]), ALL(Sale))

Measure1=CALCULATE(SUM(Sale[Sales]), ALL(Sale[Column1]))

Best Regards,

Amy

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.  Resident Rockstar

hi @jaydonguyen ,

When you say fixed calculation, you mean the result of a calculation doesn't change no matter what filter you choose? You can do something like:

``````calculation =
CALCULATE ( SUM ( Table[Column] ), ALL ( Table ), ALL ( Table2 ) )``````

This fixes the result of an expression regardless of the filters applied to the tables in the model that are included in the formula. Or you can just fix the calcuation for a particular column. The formula below removes any active filteres to Column2 but will be filtered if filters are applied to any other column.

``````calculation =
CALCULATE ( SUM ( Table[Column] ), ALL ( Table[Column2] ) )``````

There's a good read in sqlbi - https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept.... If you are new to this, though, it will take sometime to digest it.

"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand." Announcements #### Welcome to the User Group Public Preview  