Skip to content

Commit dfeb4f1

Browse files
Merge pull request #635 from MicrosoftDocs/doug-july23-update
Added July updates to Power Query M reference
2 parents 17dbb70 + b56f950 commit dfeb4f1

7 files changed

Lines changed: 57 additions & 26 deletions

query-languages/m/combiner-combinetextbydelimiter.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: Combiner.CombineTextByDelimiter"
33
title: "Combiner.CombineTextByDelimiter"
4-
ms.date: 10/7/2022
4+
ms.date: 6/15/2023
55
---
66
# Combiner.CombineTextByDelimiter
77

@@ -13,7 +13,7 @@ Combiner.CombineTextByDelimiter(<b>delimiter</b> as text, optional <b>quoteStyle
1313

1414
## About
1515

16-
Returns a function that combines a list of text into a single text using the specified delimiter.
16+
Returns a function that combines a list of text values into a single text value using the specified delimiter.
1717

1818
## Example 1
1919

@@ -28,3 +28,34 @@ Combiner.CombineTextByDelimiter(";")({"a", "b", "c"})
2828
**Output**
2929

3030
`"a;b;c"`
31+
32+
## Example 2
33+
34+
Combine the text of two columns using a comma delimiter and CSV-style quoting.
35+
36+
**Usage**
37+
38+
```powerquery-m
39+
let
40+
Source = #table(
41+
type table [Column1 = text, Column2 = text],
42+
{{"a", "b"}, {"c", "d,e,f"}}
43+
),
44+
Merged = Table.CombineColumns(
45+
Source,
46+
{"Column1", "Column2"},
47+
Combiner.CombineTextByDelimiter(",", QuoteStyle.Csv),
48+
"Merged"
49+
)
50+
in
51+
Merged
52+
```
53+
54+
**Output**
55+
56+
```powerquery-m
57+
#table(
58+
type table [Merged = text],
59+
{{"a,b"}, {"c,""d,e,f"""}}
60+
)
61+
```

query-languages/m/combiner-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
description: "Learn more about: Combiner functions"
33
title: "Combiner functions"
4-
ms.date: 5/16/2022
4+
ms.date: 6/15/2023
55
---
66
# Combiner functions
77

88
These functions are used by other library functions that merge values. For example, `Table.ToList` and `Table.CombineColumns` apply a combiner function to each row in a table to produce a single value for each row.
99

1010
|Name|Description|
1111
|------------|---------------|
12-
|[Combiner.CombineTextByDelimiter](combiner-combinetextbydelimiter.md)|Returns a function that combines a list of text into a single text using the specified delimiter.|
12+
|[Combiner.CombineTextByDelimiter](combiner-combinetextbydelimiter.md)|Returns a function that combines a list of text values into a single text value using the specified delimiter.|
1313
|[Combiner.CombineTextByEachDelimiter](combiner-combinetextbyeachdelimiter.md)|Returns a function that combines a list of text into a single text using each specified delimiter in sequence.|
1414
|[Combiner.CombineTextByLengths](combiner-combinetextbylengths.md)|Returns a function that combines a list of text into a single text using the specified lengths.|
1515
|[Combiner.CombineTextByPositions](combiner-combinetextbypositions.md)|Returns a function that combines a list of text into a single text using the specified positions.|

query-languages/m/csv-document.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: Csv.Document"
33
title: "Csv.Document"
4-
ms.date: 9/15/2022
4+
ms.date: 6/15/2023
55
---
66
# Csv.Document
77

@@ -25,8 +25,12 @@ If a record is specified for `columns` (and `delimiter`, `extraValues`, and `enc
2525
* `Delimiter`: The column delimiter. Default: `","`.
2626
* `Columns`: Can be null, the number of columns, a list of column names, or a table type. If the number of columns is lower than the number found in the input, the additional columns will be ignored. If the number of columns is higher than the number found in the input, the additional columns will be null. When not specified, the number of columns will be determined by what is found in the input.
2727
* `Encoding`: The text encoding of the file. Default: 65001 (UTF-8).
28-
* `CsvStyle`: Specifies how quotes are handled. [CsvStyle.QuoteAfterDelimiter](csvstyle-type.md) (default): Quotes in a field are only significant immediately following the delimiter. [CsvStyle.QuoteAlways](csvstyle-type.md): Quotes in a field are always significant, regardless of where they appear.
29-
* `QuoteStyle`: Specifies how quoted line breaks are handled. [QuoteStyle.None](quotestyle-type.md) (default): All line breaks are treated as the end of the current row, even when they occur inside a quoted value. [QuoteStyle.Csv](quotestyle-type.md): Quoted line breaks are treated as part of the data, not as the end of the current row.
28+
* `CsvStyle`: Specifies how quotes are handled.
29+
* [CsvStyle.QuoteAfterDelimiter](csvstyle-type.md) (default): Quotes in a field are only significant immediately following the delimiter.
30+
* [CsvStyle.QuoteAlways](csvstyle-type.md): Quotes in a field are always significant, regardless of where they appear.
31+
* `QuoteStyle`: Specifies how quoted line breaks are handled.
32+
* [QuoteStyle.Csv](quotestyle-type.md) (default): Quoted line breaks are treated as part of the data, not as the end of the current row.
33+
* [QuoteStyle.None](quotestyle-type.md): All line breaks are treated as the end of the current row, even when they occur inside a quoted value.
3034

3135
## Example 1
3236

query-languages/m/itemexpression-from.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: ItemExpression.From"
33
title: "ItemExpression.From"
4-
ms.date: 10/7/2022
4+
ms.date: 6/15/2023
55
---
66
# ItemExpression.From
77

@@ -15,16 +15,15 @@ ItemExpression.From(<b>function</b> as function) as record
1515

1616
Returns the abstract syntax tree (AST) for the body of `function`, normalized into an *item expression*:
1717

18-
- The function must be a 1-argument lambda.
19-
- All references to the function parameter are replaced with [ItemExpression.Item](itemexpression-item.md).
20-
- The AST will be simplified to contain only nodes of the kinds:
21-
- `Constant`
22-
- `Invocation`
23-
- `Unary`
24-
- `Binary`
25-
- `If`
26-
- `FieldAccess`
27-
- `NotImplemented`
18+
* The function must be a 1-argument lambda.
19+
* All references to the function parameter are replaced with [ItemExpression.Item](itemexpression-item.md).
20+
* The AST will be simplified to contain only nodes of the kinds:
21+
* `Constant`
22+
* `Invocation`
23+
* `Unary`
24+
* `Binary`
25+
* `If`
26+
* `FieldAccess`
2827

2928
An error is raised if an item expression AST cannot be returned for the body of `function`.
3029

query-languages/m/rowexpression-from.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: RowExpression.From"
33
title: "RowExpression.From"
4-
ms.date: 3/16/2022
4+
ms.date: 6/15/2023
55
---
66
# RowExpression.From
77

@@ -25,7 +25,6 @@ Returns the abstract syntax tree (AST) for the body of `function`, normalized in
2525
* `Binary`
2626
* `If`
2727
* `FieldAccess`
28-
* `NotImplemented`
2928

3029
An error is raised if a row expression AST cannot be returned for the body of `function`.
3130

query-languages/m/table-removecolumns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: Table.RemoveColumns"
33
title: "Table.RemoveColumns"
4-
ms.date: 5/17/2022
4+
ms.date: 6/15/2023
55
---
66
# Table.RemoveColumns
77

@@ -13,7 +13,7 @@ Table.RemoveColumns(<b>table</b> as table, <b>columns</b> as any, optional <b>mi
1313

1414
## About
1515

16-
Removes the specified `columns` from the `table` provided. If a specified column doesn't exist, an error is raised unless the optional parameter `missingField` specifies an alternative behavior (for example, `MissingField.UseNull` or `MissingField.Ignore`).
16+
Removes the specified `columns` from the `table` provided. If the specified column doesn't exist, an error is raised unless the optional parameter `missingField` specifies an alternative behavior (for example, `MissingField.UseNull` or `MissingField.Ignore`).
1717

1818
## Example 1
1919

query-languages/m/text-combine.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: Text.Combine"
33
title: "Text.Combine"
4-
ms.date: 5/11/2023
4+
ms.date: 6/15/2023
55
---
66
# Text.Combine
77

@@ -13,9 +13,7 @@ Text.Combine(<b>texts</b> as list, optional <b>separator</b> as nullable text) a
1313

1414
## About
1515

16-
Returns the result of combining the list of text values, `texts`, into a single text value. Any `null` values present in `texts` are ignored.
17-
18-
An optional `separator` used in the final combined text may be specified.
16+
Returns the result of combining the list of text values, `texts`, into a single text value. Any `null` values present in `texts` are ignored. An optional `separator` used in the final combined text can be specified.
1917

2018
## Example 1
2119

0 commit comments

Comments
 (0)