Table of contents
TOC
Collapse the table of content
Expand the table of content

Table.Partition

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

About

Partitions the table into a list of groups number of tables, based on the value of the column of each row and a hash function. The hash function is applied to the value of the column of a row to obtain a hash value for the row. The hash value modulo groups determines in which of the returned tables the row will be placed.

Table.Partition ( table as table, column as text, groups as number, hash as function) as list  

Arguments

ArgumentDescription
tableThe Table to modify.
columnThe column to apply hash to.
groupsThe number of groups to make.
hashThe hash function to apply.

Example

Table.Partition(Table.FromRecords({[A=1], [A=2], [A=3], [A=4], [A=5], [A=6]}),"A", 2, each _)  
  
equals Table.FromRecords({[A=2], [A=4], [A=6]})  
© 2018 Microsoft