Skip to content

Repo sync for protected branch #296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions query-languages/dax/dateadd-function-dax.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ The following formula calculates dates that are one year before the dates in the
= DATEADD(DateTime[DateKey],-1,year)
```

## Special behavior

When the selection includes the last two days of month, DATEADD will use "extension" semantics and will include the days till the end of month. For example, when Feb 27 and 28 of 2013 are included in the selection and a month is added, DATEADD will return March 27 to 31.

This behavior only happens when last two days of month are included in the selection. If only Feb 27 is selected, it will go to March 27.

```dax
= DATEADD(DateTime[DateKey], 1, month)
```

## Related content

[Time intelligence functions](time-intelligence-functions-dax.md)
Expand Down
1 change: 1 addition & 0 deletions query-languages/m/csv-document.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ If a record is specified for `columns` (and `delimiter`, `extraValues`, and `enc
* `QuoteStyle`: Specifies how quoted line breaks are handled.
* [QuoteStyle.Csv](quotestyle-type.md) (default): Quoted line breaks are treated as part of the data, not as the end of the current row.
* [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.
* `IncludeByteOrderMark`: A logical value indicating whether to include a Byte Order Mark (BOM) at the beginning of the CSV output. When set to true, the BOM is written (for example, UTF-8 BOM: `0xEF 0xBB 0xBF`); when set to false, no BOM is included. This option is applicable only in output scenarios.

## Example 1

Expand Down
2 changes: 1 addition & 1 deletion query-languages/m/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"author": "dougklopfenstein",
"ms.author": "dougklo",
"searchScope": ["Power Query","M formula language"],
"ms.date": "2/10/2025",
"ms.date": "3/18/2025",
"no-loc": [
"#binary",
"#date",
Expand Down
21 changes: 18 additions & 3 deletions query-languages/m/duration-from.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ Duration.From(<b>value</b> as any) as nullable duration

## About

Returns a `duration` value from the given `value`. If the given `value` is `null`, **Duration.From** returns `null`. If the given `value` is `duration`, `value` is returned. Values of the following types can be converted to a `duration` value:
Returns the duration value from the given value.

* `text`: A `duration` value from textual elapsed time forms (d.h:m:s). Refer to [Duration.FromText](duration-fromtext.md) for details.
* `number`: A `duration` equivalent to the number of whole and fractional days expressed by `value`.
* `value`: The value from which the duration is derived. If the given `value` is `null`, this function returns `null`. If the given `value` is a `duration`, `value` is returned. Values of the following types can be converted to a `duration` value:
* `text`: A `duration` value from textual elapsed time forms (d.h:m:s). Refer to [Duration.FromText](duration-fromtext.md) for details.
* `number`: A `duration` equivalent to the number of whole and fractional days expressed by `value`.

If `value` is of any other type, an error is returned.

Expand All @@ -33,3 +34,17 @@ Duration.From(2.525)
**Output**

`#duration(2, 12, 36, 0)`

## Example 2

Convert the text value `"2.05:55:20.34567"` into a `duration` value.

**Usage**

```powerquery-m
Duration.From("2.05:55:20.34567")
```

**Output**

`#duration(2, 5, 55, 20.3456700)`
25 changes: 24 additions & 1 deletion query-languages/m/text-split.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ Text.Split(<b>text</b> as text, <b>separator</b> as text) as list

## About

Returns a list of text values resulting from the splitting a text value `text` based on the specified delimiter, `separator`.
Returns a list of text values resulting from the splitting of a text value based on the specified delimiter.

* `text`: The text value to split.
* `separator`: The delimiter used to split the text. The delimiter can be either a single character or a sequence of characters. If a sequence of characters is used, the text is split only at instances where the exact sequence occurs.

## Example 1

Expand All @@ -34,3 +37,23 @@ Text.Split("Name|Address|PhoneNumber", "|")
"PhoneNumber"
}
```

## Example 2

Create a list from the text value using a sequence of characters.

**Usage**

```powerquery-m
Text.Split("Name, the Customer, the Purchase Date", ", the ")
```

**Output**

```powerquery-m
{
Name,
Customer,
Purchase Date
}
```
20 changes: 12 additions & 8 deletions query-languages/m/text-splitany.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,30 @@ Text.SplitAny(<b>text</b> as text, <b>separators</b> as text) as list

## About

Returns a list of text values resulting from the splitting a text value `text` based on any character in the specified delimiter, `separators`.
Returns a list of text values resulting from the splitting of a text value based on any character specified in the delimiter.

* `text`: The text value to split.
* `separator`: The delimiter characters used to split the text.

## Example 1

Create a list from the text value "Jamie|Campbell|Admin|Adventure Works|www.adventure-works.com".
Create a list from the given text using the specified delimiter characters.

**Usage**

```powerquery-m
Text.SplitAny("Jamie|Campbell|Admin|Adventure Works|www.adventure-works.com", "|")
Text.SplitAny("Name|Customer ID|Purchase|Month-Day-Year", "|-")
```

**Output**

```powerquery-m
{
"Jamie",
"Campbell",
"Admin",
"Adventure Works",
"www.adventure-works.com"
"Name",
"Customer ID",
"Purchase",
"Month",
"Day",
"Year"
}
```