Basic aggregation functions
Although one of the goals of data warehousing is to bring the data in the most aggregated and organized form possible, it is necessary to have functions within the BI tool that allow you to aggregate the data in various ways. DAX has several aggregate functions, such as the SUM
function that you saw a few sections ago. This function sums all the values in a column.
Similarly, the MAX
, MIN
, COUNT
, and AVERAGE
functions are used to obtain the maximum, minimum, count, and average values, respectively. Each of these functions has a different tolerance for certain types of data, and it is important to know their particularities because you will have to use at least one of them in your day-to-day work as a data analyst.
Using MAX and MIN
In the following measure, you can see one of the ways you can use the MAX
or MIN
function. In this case, two values are passed to the function to obtain the greater of the two, and in this example, the result would be...