Data types
Data types
Article
01/16/2025
9 contributors
In this article
Blank
Text, Hyperlink, Image, and Media
Numbers
Date, Time, and DateTime
Choices and Yes/No
Information flows through Power Fx in small, discrete values, very much like the
cells of a spreadsheet. For example, data in a Birthday field and an Anniversary
field would both flow through as a Date value that includes the year, the month,
and the day. Power Fx knows how to format these values, constrain input to what is
appropriate for each, and share the values with a database. Birthdays differ from
anniversaries to people, but the system handles them in exactly the same manner. In
this case, Date is an example of a data type.
This article provides details for the data types that Power Fx supports. When Power
Fx connects to an external data source, each data type in that source is mapped to
a data type in Power Fx.
Blank
All data types can have a value of blank (in other words, no value). The term
"null" is often used in databases for this concept.
Use the Blank function with the Set or Patch function to set a variable or field to
blank. For example, Set( x, Blank() ) removes any value in the global variable x.
Test for a blank value by using the IsBlank function. Replace possible blank values
with non-blank values by using the Coalesce function.
Because all data types support blank, the Boolean and Two option data types
effectively have three possible values.
Embedded text
Embedded text strings in a formula are enclosed in double quotation marks. Use two
double quotes together to represent a single double quote in the text string. For
example, using the following formula in the OnSelect property of a Button control:
Power Fx
Copy
Notify( "Jane said ""Hello, World!""" )
results in a banner when the button is pressed, where the first and last double
quotes are omitted (as they delimit the text string) and the repeated double quotes
around Hello, World! are replaced with a single double quote:
Single quotation marks are used for identifier names that contain special
characters and have no special significance within a text string.