Value.Versions is a Power Query M function whose purpose and return value are not documented.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Value.Versions( value as any ) as table
Description
The Value.Versions
function enables access to different versions of data in sources supporting versioning. It returns a table with rows representing each data version, where Version 0 is the earliest and the highest number number signifies the latest version.
Examples
Suppose you’re working with the Lakehouse.Contents function.
let
Source = Lakehouse.Contents(),
SelectWorkspace = Source{[workspaceId = "insertworkspaceid"]}[Data],
SelectLakehouse = SelectWorkspace{[lakehouseId = "insertlakehouseid"]}[Data],
SelectTable = SelectLakehouse{[Id = "nested_table", ItemKind = "Table"]}[Data]
in
SelectTable
Using the Value.Versions function you can retrieve a table with all different versions available.
let
Source = Lakehouse.Contents(),
SelectWorkspace = Source{[workspaceId = "insertworkspaceid"]}[Data],
SelectLakehouse = SelectWorkspace{[lakehouseId = "insertlakehouseid"]}[Data],
SelectTable = SelectLakehouse{[Id = "nested_table", ItemKind = "Table"]}[Data],
ShowVersions = Value.Versions(SelectTable)
in
ShowVersions
The latest version of your data is represented by version 0, and each later version gets an incremented version number. To access the tables with the different version data you can drill into the Values in the ‘Data’ column. For instance, to drill into the value of version 1, you can find it in the second row of the data column. When you provide both a column name and a row index, you can zoom into that value, which looks as follows:
let
Source = Lakehouse.Contents(),
SelectWorkspace = Source{[workspaceId = "insertworkspaceid"]}[Data],
SelectLakehouse = SelectWorkspace{[lakehouseId = "insertlakehouseid"]}[Data],
SelectTable = SelectLakehouse{[Id = "nested_table", ItemKind = "Table"]}[Data],
ShowVersions = Value.Versions(SelectTable),
GetVersion1 = ShowVersions{1}[Data]
in
GetVersion1
Related articles
Learn more about Value.Versions in the following articles:
- Getting Different Versions Of Data With Value.Versions In Power Query
This article describes the Value.Versions function in Power Query M language, which allows accessing different versions of data in supported sources. It explains its use with DeltaLake connector and Fabric Lakehouses. » Read more
Related functions
Other functions related to Value.Versions are:
- Value.Alternates
- Value.Expression
- Value.Lineage
- Value.ResourceExpression
- Value.Traits
- Value.Type
- Value.VersionIdentity
2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy