diff --git a/query-languages/dax/dateadd-function-dax.md b/query-languages/dax/dateadd-function-dax.md index aa0837ad..32fa7fef 100644 --- a/query-languages/dax/dateadd-function-dax.md +++ b/query-languages/dax/dateadd-function-dax.md @@ -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) diff --git a/query-languages/m/csv-document.md b/query-languages/m/csv-document.md index 69451c18..6dfb23e7 100644 --- a/query-languages/m/csv-document.md +++ b/query-languages/m/csv-document.md @@ -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 diff --git a/query-languages/m/docfx.json b/query-languages/m/docfx.json index e7ed80f7..4f75222e 100644 --- a/query-languages/m/docfx.json +++ b/query-languages/m/docfx.json @@ -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", diff --git a/query-languages/m/duration-from.md b/query-languages/m/duration-from.md index 318fced9..e77fc68a 100644 --- a/query-languages/m/duration-from.md +++ b/query-languages/m/duration-from.md @@ -13,10 +13,11 @@ Duration.From(value 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. @@ -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)` diff --git a/query-languages/m/text-split.md b/query-languages/m/text-split.md index f12f8898..9bc5cf5b 100644 --- a/query-languages/m/text-split.md +++ b/query-languages/m/text-split.md @@ -13,7 +13,10 @@ Text.Split(text as text, separator 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 @@ -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 +} +``` diff --git a/query-languages/m/text-splitany.md b/query-languages/m/text-splitany.md index 5f5bc519..75cdc255 100644 --- a/query-languages/m/text-splitany.md +++ b/query-languages/m/text-splitany.md @@ -13,26 +13,30 @@ Text.SplitAny(text as text, separators 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" } ```