Excel 2019 Bible

(singke) #1

Part V: Understanding Power Pivot and Power Query


FIGURE 39.26
A formula to merge the Type and Code columns

TABLE 39.1 Common Conversion Functions

Convert From To Function
Date Tex t Date.ToText()
Time Tex t Time.ToText()
Number Tex t Number.ToText()
Tex t Number Number.FromText()
Tex t Da te s Date Date.FromText()
Numeric Dates Date Date.From()

All that being said, it’s clear that you’ll need to know the data types for the fields that you
use in Power Query formulas. That way, you’ll know which conversion functions to use.

To discover and change the data type for a field, place your cursor in the field and then
select the Data Type drop-down on the Transform tab (see Figure 39.27). The data type at
the top of the drop-down is the type for the field you’re on. You can edit the data type for
the field by selecting a new type from the drop-down list.
Free download pdf