 # How to Calculate the SUM, COUNT, AVERAGE, MAX, and MIN in PowerApps

In the realm of PowerApps Data Calculations, it’s often necessary to compute key values such as sum, count, average, max, and min. This tutorial specifically uses the myExpensesData collection to illustrate effective methods for calculating these essential figures in PowerApps.

## Introduction

Explore the essentials of PowerApps Data Calculations in this guide. Microsoft’s PowerApps is a robust platform for creating custom applications, with a key focus on processing and analyzing data. This tutorial delves into the efficient calculation of sums, counts, averages, maximums, and minimums, crucial for managing financial and expense data.

### Sample Data: Travel Expenses

```Date	    Item	Value
1/1/2020	Hotel	1050
1/1/2020	Food	30
1/2/2020	Food	75
1/3/2020	Hotel	1300
1/3/2020	Food	50
1/4/2020	Flight	800
```

## Calculating the SUM of Values

Output value: 3305

``````
//Create the collection
ClearCollect(myExpensesData,
{Date: Date(2020,1,1), Item: "Hotel", Amount: 1050},
{Date: Date(2020,1,1), Item: "Food", Amount: 30 },
{Date: Date(2020,1,2), Item: "Food", Amount: 75 },
{Date: Date(2020,1,3), Item: "Hotel", Amount: 1300},
{Date: Date(2020,1,3), Item: "Food", Amount: 50},
{Date: Date(2020,1,4), Item: "Flight", Amount: 800}
);

//Compute the sum
Sum(myExpensesData,Amount)
``````

## Counting the Number of Values

`Output value: 6`
``````
//Compute the count
CountRows(myExpensesData)
``````

## Finding the AVERAGE of Values

`Output value: 550.8333`
``````
//Compute the average
Average(myExpensesData,Amount)
``````

## Identifying the MAX Value

`Output value: 1300`
``````
//Compute the maximum value
Max(myExpensesData,Amount)
``````

## Determining the MIN Value

`Output value: 30`
``````
//Compute the minimum value
Min(myExpensesData,Amount)
``````

## Conclusion

Computing essential values such as the sum, count, average, max, and min can be easily achieved in PowerApps. By following the steps mentioned in this tutorial, you can quickly derive these values from any collection of data. PowerApps continues to prove its usefulness, especially for tasks like these. For more information, visit Powerapps.com or Microsoft’s official website.