Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Solved! Go to Solution.
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.
Proud to be a Super User!
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]))
If I misunderstood it, could you please share your sample data and desired output screenshots for further analysis? You can also upload sample pbix to OneDrive and post the link here. Do mask sensitive data before uploading.
Please read this post to get your answer quickly: How to Get Your Question Answered Quickly.
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.
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.
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |