The ALL
function works with FILTER
to remove any conditions that are on your data. This is helpful when you are creating calculations that need to use the entire dataset as the denominator. Using the ALL
function ignores any filters or slices that are applied in a query or end user tool. The ALL
function has a required syntax of: ALL(<table>|<column>)
.
In this recipe, you will create a new measure to show the number of crashes reported using the CALCULATE
function and the ALL
function to ensure all filtering is removed.
On the CRASH_DATA_T table in the Grid view, select an empty cell under the CASENUMBER measure.
Enter the calculation in the formula bar:
Crashes_Reported:= CALCULATE( COUNT(CRASH_DATA_T[CASENUMBER]), ALL(CRASH_DATA_T) )
Once you have done this, hit Enter.
The measure now shows the total number of cases on the CRASH_DATA_T table. The total will be calculated regardless...