Blanks and Nulls in Power Apps: Why Your Formulas Keep Breaking
Blank values in Power Apps cause unexpected errors, wrong comparisons, and broken lookups. Here's how to check for them, handle them safely, and stop your formulas from silently failing.
Blank values are one of the most common sources of formula errors in canvas apps. A field that’s supposed to have data comes back empty, a lookup returns nothing, or a division by zero sneaks in because a denominator is blank. The app doesn’t crash — it just shows wrong results.
Here’s how to handle blanks properly.
IsBlank vs IsEmpty
These two functions check for different things:
IsBlank — Checks if a single value is blank (null, empty string, or unset).
IsBlank(TextInput1.Text) // true if the text box is empty
IsBlank(ThisItem.Email) // true if the email field has no value
IsBlank("") // true
IsBlank(0) // false — zero is not blank
IsEmpty — Checks if a table or collection has zero rows.
IsEmpty(Filter(Contacts, Status = "Active")) // true if no matching records
IsEmpty(colCartItems) // true if collection is empty
The rule: use IsBlank for values, IsEmpty for tables. Using IsBlank on a table or IsEmpty on a value gives wrong results or errors.
Coalesce: The Clean Alternative
Coalesce returns the first non-blank value from a list of arguments. It’s the cleanest way to provide fallback values:
Coalesce(ThisItem.Nickname, ThisItem.'First Name', "Unknown")
This checks Nickname first. If it’s blank, it checks First Name. If both are blank, it returns "Unknown".
Common uses:
// Default to 0 for calculations
Coalesce(ThisItem.Quantity, 0) * ThisItem.Price
// Default display text
Coalesce(ThisItem.'Middle Name', "-")
// Default to current date
Coalesce(ThisItem.'Due Date', Today())
Empty String vs True Blank
This catches people. In Power Apps, an empty string "" and Blank() are treated as equal by IsBlank:
IsBlank("") // true
IsBlank(Blank()) // true
"" = Blank() // true
But some Dataverse columns distinguish between null (never set) and empty string (explicitly cleared). If you need to tell the difference when reading data through an API, you’ll need to check at the data source level. Inside Power Apps formulas, they’re interchangeable.
Defensive Formula Patterns
Safe Division
// Dangerous: crashes or returns error if denominator is blank or zero
ThisItem.Revenue / ThisItem.EmployeeCount
// Safe: check first
If(
Coalesce(ThisItem.EmployeeCount, 0) = 0,
0,
ThisItem.Revenue / ThisItem.EmployeeCount
)
Safe Lookup
// Dangerous: if no record matches, everything after LookUp returns an error
LookUp(Accounts, 'Account Name' = "Contoso").'Main Phone'
// Safe: store the result first, then check
With(
{ account: LookUp(Accounts, 'Account Name' = "Contoso") },
If(IsBlank(account), "Not found", account.'Main Phone')
)
Safe Text Concatenation
// If any part is blank, the concatenation still works in Power Apps
// but may show "blank" as literal text in some contexts
"Hello, " & Coalesce(varUserName, "there")
Safe Gallery Display
// Label in a gallery — handle blank lookup
If(
IsBlank(ThisItem.'Company Name'),
"No company assigned",
ThisItem.'Company Name'.'Account Name'
)
Blank Lookups Are the Biggest Trap
When a lookup column is blank (no related record), trying to access a property on it causes an error:
// If 'Company Name' is blank, this errors
ThisItem.'Company Name'.'Account Name'
The fix:
// Option 1: If check
If(
IsBlank(ThisItem.'Company Name'),
"",
ThisItem.'Company Name'.'Account Name'
)
// Option 2: IfError (catches the error inline)
IfError(
ThisItem.'Company Name'.'Account Name',
""
)
Setting Fields to Blank
To explicitly clear a field:
Patch(
Contacts,
ThisItem,
{
'Middle Name': Blank(),
'Company Name': Blank() // clears a lookup
}
)
For text inputs, "" and Blank() both work. For lookup columns, use Blank().
Blank in Filters
Filtering for blank values:
// Find contacts with no email
Filter(Contacts, IsBlank(Email))
// Find contacts WITH an email
Filter(Contacts, !IsBlank(Email))
Note: IsBlank in a Filter may or may not be delegable depending on the data source. For Dataverse, filtering by Column = Blank() is delegable, but IsBlank(Column) may not be. Use the equality form when delegation matters:
// Delegation-safe way to filter for blank values
Filter(Contacts, Email = Blank())
Common Mistakes and How to Fix Them
IsBlank Returns True on Zero
It doesn’t. IsBlank(0) is false. But IsBlank(Blank()) is true. If a numeric field was never set, it might be Blank() in Dataverse but 0 in the app (Power Apps sometimes converts null numbers to 0). If you need to distinguish between “never set” and “explicitly set to zero,” you’ll need an additional flag column.
Comparing Blank to Blank
Blank() = Blank() // true
This works as expected. Two blank values are equal.
IfError Hiding Real Problems
Don’t use IfError as a blanket wrapper around everything. It catches all errors, including ones you’d want to know about (like permission errors or schema changes). Use it narrowly:
// Too broad — hides all errors
IfError(SomeComplexFormula, "")
// Better — check for the specific blank condition first
If(IsBlank(ThisItem.Owner), "Unassigned", ThisItem.Owner.'Full Name')
Blank in a Number Calculation Returns Blank, Not Zero
Blank() + 5 // 5 (blank is treated as 0 in arithmetic)
Blank() * 5 // 0
5 / Blank() // Error!
Blank is coerced to 0 in addition and multiplication, but division by blank is an error. Always guard your divisors.
Text Function on Blank Returns “Error”
Text(Blank(), "mm/dd/yyyy") // might return empty or error depending on context
Check for blank before formatting:
If(IsBlank(ThisItem.DueDate), "", Text(ThisItem.DueDate, "mm/dd/yyyy"))
Related articles
Subgrids Done Right
Subgrids show related records directly on a form. Here's how to add them, choose the right relationship, filter the records, enable inline editing, and set up a New button that pre-fills the parent lookup.
Cascading Dropdowns in Canvas Apps (Yes, It's Harder Than It Should Be)
A parent dropdown for Country, a child dropdown for City that only shows cities in the selected country. Here's the pattern, the delegation-safe version, and the reset behavior that catches everyone.
Calling Power Automate from a Canvas App (And Getting Data Back)
Calling a flow from a canvas app is straightforward once you get the trigger right. Here's how to set up inputs, return data to the app, and fix the issues that come up when the two don't talk to each other.