Sub topic 1
Know your fields: categorical, numeric, date and geographic data
Prerequisites
This chapter assumes you already have the following:
- Basic familiarity with the Power BI Desktop report canvas, including the Fields pane and the Visualizations pane.
- A data model loaded into Power BI, with tables and relationships.
- An understanding of basic aggregations such as sum, average and count.
You do not need to write DAX yet. The measures chapter that follows covers that.
Why field type comes first
Every visual in Power BI takes fields as input. Each field has a data type and a role, and together these decide which visuals can display it and which can display it well. If you drop a text field into a slot that expects a number, Power BI either summarizes it as a count or refuses it. If you drop a date into a bar chart, you may get a chart that is technically valid but unreadable.
Learning to classify fields before you pick a visual saves you from trial and error. This chapter gives you four field types, shows where Power BI records them, and explains how each one narrows your choices.
The four field types
Most analytical fields fall into one of four groups.
| Field type | What it holds | Example fields | Typical role in a visual |
|---|---|---|---|
| Categorical | Labels that group rows | Product Category, Region, Customer Segment | Axis, Legend, Rows, Slicer |
| Numeric | Quantities you can calculate with | Sales Amount, Quantity, List Price | Values, Y-axis, Size |
| Date and time | Points on a timeline | Order Date, Ship Date, Month | X-axis of a trend chart, Slicer |
| Geographic | Places | Country, State, City, Postal Code, Latitude, Longitude | Location, Latitude, Longitude |
Categorical fields
A categorical field sorts rows into groups. The values are labels, and arithmetic on them is meaningless. Two subtypes matter when you choose a visual.
- Nominal categories have no natural order. Product Category and Sales Region are examples. You can sort them by any measure you like, and the best order is usually by value so the reader can rank them.
- Ordinal categories have a fixed order. Examples are "Low, Medium, High", satisfaction ratings, or size labels such as S, M, L. Sorting these by value breaks the order, so you sort them by a helper column.
Cardinality, the number of distinct values, is the second constraint. A field with 5 categories fits on a bar chart. A field with 5,000 customers does not. High-cardinality fields work better in a table, behind a Top N filter, or as a slicer. Before you place a categorical field on an axis, check how many distinct values it has. You can see this by dropping it into a card and changing the summarization to Count (Distinct).
Numeric fields
A numeric field holds quantities. Power BI marks these with a sigma (Σ) icon in the Fields pane when they are set to summarize by default. Numeric fields come in two practical kinds.
- Additive values can be summed across any grouping. Sales Amount and Units Sold are additive.
- Non-additive values should not be summed. Unit Price, Discount Percentage, and Margin Percentage are examples. Summing them produces a number with no meaning. You average them, take a minimum or maximum, or recompute them as a ratio of two sums in a measure.
A common error is leaving a non-additive field on the default Sum. Check the dropdown on the field in the Values well and choose the aggregation that matches the meaning of the data.
Some numeric fields are really categorical. Year (2023, 2024), Product ID, and Postal Code are stored as numbers but are labels. If you drag one into Values, Power BI sums it and shows a meaningless total. Set these to Don't summarize, or change the data type to text, so they behave as categories.
Date and time fields
A date field is ordered, continuous, and hierarchical. These properties make it different from an ordinary category.
- The values have a fixed order, so the axis should run left to right in time order.
- Gaps matter. If a month has no sales, the timeline should still show that month.
- Dates form a hierarchy of Year, Quarter, Month and Day, which supports drill-down.
Power BI builds an automatic date hierarchy for date columns unless you turn off Auto date/time in the options. In a larger model, a dedicated date table is the better practice. It gives you control over fiscal calendars, month sort order, and time-intelligence functions such as the prior-year measure you will see later in this tutorial. Mark it as a date table so those functions work.
On a chart axis, a date field has two modes.
- Continuous treats dates as points on a true timeline. Spacing reflects the real time gaps. This suits line and area charts.
- Categorical treats each date as a separate label. This suits column charts where you want one column per month and want to compare them.
You switch between them in the X-axis format settings, under Type.
Geographic fields
A geographic field identifies a place. Power BI can place a field on a map if it knows it represents a location. You help it by setting the Data category in the Column tools tab, for example Country/Region, State or Province, City, or Postal Code. You can also supply Latitude and Longitude as numeric fields.
Geographic fields have a few traps.
- Names can be ambiguous. "Paris" could be in France or in Texas. Add a parent field such as Country to the Location well, or build a combined column, so Power BI geocodes correctly.
- Geocoding depends on a service, and large datasets or restricted tenants can fail to plot. Latitude and longitude are more reliable when you have them.
- A geographic field is also a categorical field. You can use State on a bar chart. A map is justified only when position itself matters to the question.
How Power BI tells you what a field is
You can check how Power BI has classified a field in three places.
- Icons in the Fields pane. A sigma marks a numeric field that summarizes. A calendar marks a date. A globe marks a geographic category. Plain fields with no icon are text.
- The Column tools tab. It shows the Data type, the Format, the Summarization, and the Data category of the selected column.
- Power Query. The type icon in each column header shows the type applied at load time. Fixing a type here is better than patching it in every report.
The following table lists common misclassifications and the fix.
| Symptom | Likely cause | Fix |
|---|---|---|
| A bar chart shows one huge bar named "Total" for Year | Year is numeric and was summed | Set Summarization to Don't summarize |
| Dates appear as text, in alphabetical order | Column was loaded as Text | Change type to Date in Power Query |
| The map plots a city in the wrong country | Ambiguous place name | Add Country to the Location well |
| An average price chart shows a value far too high | Unit Price is summed | Switch aggregation to Average |
| Months sort as Apr, Aug, Dec | Month Name sorts alphabetically | Use Sort by column with Month Number |
From field type to visual shortlist
Once you know the types, the combination of types narrows the options. The pairing you have in hand is often enough to produce a shortlist before you consider the question in detail.
| Fields available | Shortlist |
|---|---|
| One categorical + one numeric | Bar, column, donut, treemap |
| One date + one numeric | Line, area, column |
| Date + categorical + numeric | Line chart with legend, stacked column |
| Two numeric (+ a category for points) | Scatter, bubble |
| Geographic + numeric | Map, filled map, or a bar chart ranked by place |
| Two categorical + one numeric | Matrix, clustered or stacked bar |
| One numeric alone | Card, KPI, gauge |
This is a starting point. The next chapters add the question, which refines the shortlist, and the pitfalls that rule some options out.
Checking field types in practice
Before building a report page, run a short audit of the fields you plan to use.
- List each field and write its type: categorical, numeric, date or geographic.
- For categorical fields, note whether they are ordinal and how many distinct values they have.
- For numeric fields, mark each as additive or non-additive, and note the correct aggregation.
- For date fields, confirm that a date table exists and is marked.
- For geographic fields, confirm the Data category is set and the place names are unambiguous.
The result is a one-page field inventory. It takes a few minutes, and it removes most of the problems that otherwise show up after you have built the visual.
Summary of constraints
- Categorical fields group rows. Watch for order (ordinal) and for the number of distinct values.
- Numeric fields supply the values. Decide whether each is additive before choosing an aggregation.
- Date fields need a timeline axis and a date table. Decide between continuous and categorical axis types.
- Geographic fields need a Data category and unambiguous names. Use a map only when location matters.
Exercise
A model has these columns: Order Year (stored as the whole number 2024), Unit Price, Sales Amount, Region, and Satisfaction (values Low, Medium, High). Classify each as categorical (nominal or ordinal), numeric (additive or non-additive), date, or geographic. Then state one setting you must change so a column chart of Sales Amount by Order Year displays correctly.
Show answer
Order Year is a categorical label stored as a number, or a date part. Unit Price is numeric and non-additive, so average it. Sales Amount is numeric and additive, so sum it. Region is categorical and nominal, and it is geographic if its Data category is set to a place type. Satisfaction is categorical and ordinal, so sort it with a helper column rather than by value. For the chart, set Order Year to Don't summarize so Power BI uses it as the axis category instead of summing it into the Values well.
Exercise
A line chart of daily sales shows evenly spaced points even though the data skips weekends. Which axis type setting is the likely cause, and what do you change?
Show answer
The X-axis is set to Categorical, so each date is treated as a separate label with equal spacing. Change the X-axis Type to Continuous in the format settings so the spacing reflects real time gaps.