<!-- https://learnsql.cpetoday.com/functions/m/value-type -->
# Value.Type

Language: Power Query M
Category: Errors and types
Syntax: Value.Type(value)
Summary: Returns the type of a value, such as number, text or a table type, so you can see what Power Query thinks it holds.
Returns: A type value.
Level: Intermediate
Related: Value.Is, Type.TableSchema, Table.TransformColumnTypes, Csv.Document, Excel.Workbook

## What it does
Value.Type reports the type that a value has. It is a debugging tool: when a step fails with a type error, you can check what a column or a value actually is. For a table, it returns a table type that lists the columns and their types. Combine it with Type.TableSchema to see the column list.

## Syntax and arguments
- `value`: any value, such as a number, a text value, a record, a list or a table.

## Example
A bank file loads, but the total fails with a type error. The analyst checks the type of the amount column and of one sample value.

```powerquery
let
    Source = Csv.Document(File.Contents("C:\Banking\statement-2026-03.csv"), [Delimiter = ","]),
    SampleAmount = Source[Amount]{0},
    SampleType = Value.Type(SampleAmount)
in
    SampleType
```

If the first amount is still text, the type is text, which explains the failure: the column has to be converted before it is added up. The fix is a type step, such as Table.TransformColumnTypes with `type number`.

## Example: a second, different use
Checking the column types of a loaded table: `Type.TableSchema(Value.Type(Source))` returns a table that lists each column and its type.

## Things to watch
- Value.Type on a single cell shows the cell's type, not the column's type. Check several rows if a column mixes types.
- A value read from a file is often text until a type step changes it. Do not assume a number.
- Use it while building a query, and remove the debugging steps before the query is shared.
- The result is a type, not a number or text, so use it to inspect values while you build the query rather than in the report itself.

## In business terms
Type errors are a common reason for a refresh to fail. Checking the type of a sample value is a quick way to find the cause and to show a reviewer why a conversion was needed.
