# Category: Formula

## Numbers - 10 examples of how to round numbers

When we work with numbers with Power Apps, a common requirement is to round numbers. This post summarises the formula to carry out some of the most common rounding requirements, including how to round to multiples, how to round to values such as 0.5, 0.99, 0.45, how to round to odd/even numbers, and how to return the integer portion of a decimal value.

## Formula - Difference between round, square, and curly brackets

For app builders who are relatively new, the syntax for writing formula can be confusing - perticularly with regards to the use of brackets. This post summarises the bracket types that are available in Power Apps.

## Top 3 highlights of upcoming enhancements to the Power Apps language (Power FX)

Yesterday's Build conference introduced several exciting new enhancements to the Power Apps language.This post summarises the top 3 highlights.

## Email - Sending email attachments with the Office 365 Outlook connector

The syntax to attach files to an email message can be complex. This post describes how to use the Office 365 Outlook connector to send emails with attachments. It covers how to attach files from a SharePoint record, files that a user selects using an attachments control, images, audio recordings, and multiple combinations of files.

## Formula - What to try when numbers don't format correctly

A frustrating problem that app builders sometimes encounter is the inability to format numbers correctly. This post examines what to try if you find yourself in this situation.

## Controls - How to convert HTML to Text

A frequent requirement is to convert HTML to text. This issue arises frequently when app builders attempt to display values from SharePoint rich text columns. This post summarises the methods to display rich text content in Power Apps, and how to convert HTML to text.

## Formulas - how to return all days between two dates

There are some scenarios where we need to return all the days between a given start and end date. This post describes the formula to build a table of sequential, consecutive days.

## Formula - How to create comma separated (CSV) list of items

A common requirement is to build a comma separated list based on items from a data source or collection. This post demonstrates this technique by building a CSV string of selected items from a combo box.

## Formula - How to use the IF and Switch functions - 3 common examples

The two primary functions to carry out conditional operations are If and Switch. The typical questions that arise include - how do I match a value against numeric ranges, a list of acceptable values, or a list of matching conditions? This post highlights the example syntax that we can use.

## Location - Finding the closest location and and sorting records by distance, based on the current location of the user

Given a data source that contains a list of locations, which record matches the location that is nearest to an input location? This is typical challenge we face when we want to build a feature that, for example, returns a list of stores that is sorted in distance relative to the current location of a customer. In this post, we'll walk through the formula that enables us to carry out this calculation.

## Formulas - How to cope with weekends and public holidays in date calculations

Performing date calculations that take working days and public holidays into account can be complicated. This post summarises and verifies the formula to calculate the number of working days between two dates, and the formula to add a given number of working days to a start date.

#### Recent Posts

- Formula - Transposing/converting rows to columns- an almost impossible task?
- Charts - How to create donut charts
- Settings - The easiest way to find environment id and other settings
- Admin - How to quarantine or block all users from running a specific app
- Learning - Learn Power Apps through the free Microsoft Virtual Training Day events (and receive a free exam)
- Formula - How to round times to the nearest x minutes
- Formulas - Review of how to write formulas using natural language
- Licensing - Microsoft 365 licensing price set to increase in March 2022
- SharePoint - Filtering lists by User() is now delegable
- Dates - How to get the start date from week number
- Data - How to remove/delete a field from a record
- Numbers - 10 examples of how to round numbers
- Dates - How to check if a year is a leap year
- Dates - How to get the week number for a given date
- Dates - How to get the nth weekday for a month
- Dates - How to get the last weekday for a month
- Forms - How to calculate values (eg sums and products) and store the results in SharePoint or other datasource
- Sums - How to calculate 'year to date' or running totals

#### Blog Author

Tim Leung Author, software developer, Power Platform specialist |