Sub topic 10
Data types, formats, and summarization
This chapter covers three column settings in Power BI Desktop that are easy to confuse: data type, format, and default summarization. It assumes you have installed Power BI Desktop, loaded a table with Get data, and can switch between Report, Table, and Model views. It uses a Sales table with the columns OrderID, OrderDate, CustomerID, Quantity, UnitPrice, and SalesAmount.
Three settings, three jobs
Each column in the model has settings that look related but do different things.
| Setting | Question it answers | Where it takes effect |
|---|---|---|
| Data type | What kind of value is stored? | Storage, sorting, calculations, relationships |
| Format | How is the value displayed? | Visuals and the Table view grid only |
| Summarization | What happens when the column is dropped on a visual? | Default aggregation in Report view |
Changing the format never changes the stored value. Changing the data type can change the stored value, and it can turn values into errors. Summarization only sets a default, and you can override it in each visual.
Data types
The data type decides which operations a column supports. Power BI Desktop offers these common types:
- Whole number: a 64-bit integer. Use it for counts and IDs you will do arithmetic on.
- Decimal number: a 64-bit floating-point number. Use it for measurements and rates.
- Fixed decimal number: a number with four decimal places of fixed precision. Use it for currency, where floating-point rounding is unwelcome.
- Date/time, Date, and Time: calendar and clock values.
- Text: any string.
- True/false: a Boolean.
You can see and change a column's type in Table view. Select the column, then open the Column tools tab and look at the Data type drop-down. The same drop-down appears in the Properties pane in Model view.
Where types are first assigned
Power BI Desktop guesses types when it loads data. For a CSV file it samples the first rows of each column and picks a type. This detection is written into the query as a "Changed Type" step in Power Query Editor. That means the type was set before the data reached the model.
The type you see in Table view reflects the loaded query result. If you change a type in Table view on a column that came from Power Query, you are working on the model side. The cleaner fix for a wrong type is usually in Power Query Editor, so that the correction is part of the refresh recipe.
Common type problems
- IDs typed as numbers.
CustomerIDvalues such as00417lose their leading zeros if detected as whole numbers. Set the column to Text in Power Query Editor, before the Changed Type step runs, or remove the automatic step and set it yourself. - Dates typed as text. A text column of dates sorts alphabetically and cannot be used in time intelligence. Convert it to Date. If the source uses a format such as
27/11/2026, the conversion depends on the locale, so use Using Locale in Power Query Editor when the result looks wrong. - Numbers typed as text. Text columns cannot be summed. In Report view, a text column dropped into a visual shows a count or a list rather than a total.
- Mismatched types across a relationship. Relationships join columns of the same type. A text
CustomerIDin one table and a whole number in the other will not join cleanly. Fix both sides to the same type.
Formats
Format controls display only. In Table view, select a column and use the Format drop-down on the Column tools tab. The options depend on the data type:
- Number types offer General, Currency, Whole number, Decimal number, and Percentage. You can set the number of decimal places and turn the thousands separator on or off.
- Date types offer several date and time patterns, such as short date, long date, and custom patterns.
- Text has no format options.
A common mistake is to treat a format change as a data change. If UnitPrice shows 12.35 because you chose two decimal places, the stored value may still be 12.3456. Totals are computed from the stored values, so a total can differ by a cent from adding up the displayed numbers.
Formats set on a column are inherited by visuals that use it. A visual can override them in its own Format settings. Setting the format once in Table view gives you consistent display across every report page.
Data category
Next to Format on the Column tools tab is Data category. It tells Power BI how to interpret a text column, for example as City, Country/Region, Postal Code, or Web URL. Map visuals use it to place values on a map, and a Web URL category makes values clickable in tables. Like format, it does not change the stored value.
Summarization
Summarization is the default aggregation Power BI applies when you add a column to a visual as a value. For numeric columns the default is usually Sum. You can see the setting on the Column tools tab, in the Summarization drop-down. Options include Sum, Average, Minimum, Maximum, Count, Count (Distinct), and Don't summarize.
Power BI marks numeric columns with a sigma symbol in the Data pane when they summarize by default. Columns that are IDs or years often get this wrongly, because they are numbers.
Consider OrderID typed as Whole number. Dropped into a table visual, it might be summed, giving a meaningless total. Setting its summarization to Don't summarize makes it behave as a label, and the sigma disappears. The same fix applies to CustomerID and to a numeric Year column.
Two points affect how you use this setting:
- A visual can override the default. In the Visualizations pane, the drop-down arrow beside a field in the Values well lets you choose Average, Count, and so on for that visual only.
- Summarization is not a measure. The default belongs to a column. A measure defines its own calculation and is not affected by this setting. For reusable logic, write a measure, such as the one below.
Total Sales = SUM(Sales[SalesAmount])Using this measure in a visual always sums SalesAmount, no matter what the column's default summarization is. Setting the column to Don't summarize and using the measure is a common pattern. It prevents report authors from dragging the raw column in and getting a different aggregate by accident.
Putting it together
The three settings are applied in a sequence you can follow from the source to the screen.
The stored value is fixed by the data type. Aggregation happens next. Format is applied last, only to what is shown.
A worked check
Follow these steps to check the Sales table.
- Open Table view and select the
Salestable in the Data pane. - Click the
OrderDateheader. On the Column tools tab, confirm the data type is Date. If it says Text, fix it in Power Query Editor with Transform data. - Click
SalesAmount. Set Data type to Fixed decimal number, Format to Currency, and decimal places to 2. - Click
OrderID. Set Summarization to Don't summarize. - Switch to Report view. Add
OrderIDandSalesAmountto a table visual.SalesAmountshows as a summed currency value per row, andOrderIDappears as a label. - In the Visualizations pane, open the drop-down on
SalesAmountand choose Average. Only this visual changes. Other visuals keep the column default.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Totals missing, values show as a count | Column is Text | Change the type to a number type |
| Leading zeros lost | ID detected as number | Set the column to Text in Power Query Editor |
| Dates sort A to Z, not by time | Column is Text | Convert to Date |
| An ID column shows a large sum | Default summarization is Sum | Set to Don't summarize |
| Sum off by a cent from displayed values | Format hides decimals | Round in the source, or accept display rounding |
| Relationship will not create or shows blanks | Key types differ | Make both key columns the same type |
Exercise
A Year column is typed as Whole number. When you add it to a table visual next to SalesAmount, it shows a total such as 6,078,000 instead of 2026 on each row. Name the setting that causes this, give two ways to fix it, and say which setting would not help.
Show answer
The cause is the column's default summarization, which is Sum. One fix is to set the column's Summarization to Don't summarize in Column tools, which applies to every visual. The other is to change the field's aggregation in the visual's Values well, which applies to that visual only. Changing the Format would not help, because format affects display only and does not change the aggregation. Converting the type to Text would also remove the summing, but then the column sorts as text.
Exercise
You set UnitPrice to show zero decimal places and then notice a total that does not equal the sum of the displayed numbers. Is this a bug? Explain.
Show answer
No. Format changes how a value is shown, not the value stored in the model. The total is computed from the stored, unrounded values, so it can differ from the sum of rounded display values. To change the stored values, round them in Power Query Editor or in the source.