Skip to content

Commit 067dcf9

Browse files
Merge pull request #297 from MicrosoftDocs/main638784288806487886sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 0f91d8e + 17ed783 commit 067dcf9

8 files changed

Lines changed: 77 additions & 14 deletions

File tree

query-languages/dax/dateadd-function-dax.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ The following formula calculates dates that are one year before the dates in the
5757
= DATEADD(DateTime[DateKey],-1,year)
5858
```
5959

60+
## Special behavior
61+
62+
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.
63+
64+
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.
65+
66+
```dax
67+
= DATEADD(DateTime[DateKey], 1, month)
68+
```
69+
6070
## Related content
6171

6272
[Time intelligence functions](time-intelligence-functions-dax.md)

query-languages/dax/info-functions-dax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Here is the list of INFO functions. Some work only on specific compat levels and
120120
| INFO.EXPRESSIONS | Returns a list of all expressions in the current model with columns matching the schema rowset for expressions objects. |
121121
| INFO.EXTENDEDPROPERTIES | Returns a list of all extended properties in the current model with columns matching the schema rowset for extended properties objects. |
122122
| INFO.FORMATSTRINGDEFINITIONS | |
123-
| INFO.FUNCTIONS | Returns information about the functions that are currently available for use in the DAX programming language. |
123+
| INFO.FUNCTIONS | Returns information about the functions that are currently available for use in the DAX programming language. Represents the MDSCHEMA_FUNCTIONS DMV query function, but returns only DAX (and not MDX) functions by default. If the ORIGIN restriction is not specified, it defaults to 3 or 4. |
124124
| INFO.GENERALSEGMENTMAPSEGMENTMETADATASTORAGES | |
125125
| INFO.GROUPBYCOLUMNS | |
126126
| INFO.HIERARCHIES | Represents the TMSCHEMA_HIERARCHIES DMV query function. |

query-languages/dax/sameperiodlastyear-function-dax.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ The following sample formula creates a measure that calculates the previous year
4545
= CALCULATE(SUM(ResellerSales_USD[SalesAmount_USD]), SAMEPERIODLASTYEAR(DateTime[DateKey]))
4646
```
4747

48+
## Special behavior
49+
50+
When the selection includes last two days of month, SAMEPERIODLASTYEAR will use "extension" semantics and will include the days till the end of month. For example, when Feb 27 and 28 of 2009 are included in the selection, SAMEPERIODLASTYEAR will return Feb 27 to 29 of 2008.
51+
52+
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 Feb 27.
53+
54+
```dax
55+
= SAMEPERIODLASTYEAR(DateTime[DateKey])
56+
```
57+
4858
## Related content
4959

5060
[Time intelligence functions](time-intelligence-functions-dax.md)

query-languages/m/csv-document.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ If a record is specified for `columns` (and `delimiter`, `extraValues`, and `enc
3131
* `QuoteStyle`: Specifies how quoted line breaks are handled.
3232
* [QuoteStyle.Csv](quotestyle-type.md) (default): Quoted line breaks are treated as part of the data, not as the end of the current row.
3333
* [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.
34+
* `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.
3435

3536
## Example 1
3637

query-languages/m/docfx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"author": "dougklopfenstein",
4949
"ms.author": "dougklo",
5050
"searchScope": ["Power Query","M formula language"],
51-
"ms.date": "2/10/2025",
51+
"ms.date": "3/18/2025",
5252
"no-loc": [
5353
"#binary",
5454
"#date",

query-languages/m/duration-from.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ Duration.From(<b>value</b> as any) as nullable duration
1313

1414
## About
1515

16-
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:
16+
Returns the duration value from the given value.
1717

18-
* `text`: A `duration` value from textual elapsed time forms (d.h:m:s). Refer to [Duration.FromText](duration-fromtext.md) for details.
19-
* `number`: A `duration` equivalent to the number of whole and fractional days expressed by `value`.
18+
* `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:
19+
* `text`: A `duration` value from textual elapsed time forms (d.h:m:s). Refer to [Duration.FromText](duration-fromtext.md) for details.
20+
* `number`: A `duration` equivalent to the number of whole and fractional days expressed by `value`.
2021

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

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

3536
`#duration(2, 12, 36, 0)`
37+
38+
## Example 2
39+
40+
Convert the text value `"2.05:55:20.34567"` into a `duration` value.
41+
42+
**Usage**
43+
44+
```powerquery-m
45+
Duration.From("2.05:55:20.34567")
46+
```
47+
48+
**Output**
49+
50+
`#duration(2, 5, 55, 20.3456700)`

query-languages/m/text-split.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ Text.Split(<b>text</b> as text, <b>separator</b> as text) as list
1313

1414
## About
1515

16-
Returns a list of text values resulting from the splitting a text value `text` based on the specified delimiter, `separator`.
16+
Returns a list of text values resulting from the splitting of a text value based on the specified delimiter.
17+
18+
* `text`: The text value to split.
19+
* `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.
1720

1821
## Example 1
1922

@@ -34,3 +37,23 @@ Text.Split("Name|Address|PhoneNumber", "|")
3437
"PhoneNumber"
3538
}
3639
```
40+
41+
## Example 2
42+
43+
Create a list from the text value using a sequence of characters.
44+
45+
**Usage**
46+
47+
```powerquery-m
48+
Text.Split("Name, the Customer, the Purchase Date", ", the ")
49+
```
50+
51+
**Output**
52+
53+
```powerquery-m
54+
{
55+
Name,
56+
Customer,
57+
Purchase Date
58+
}
59+
```

query-languages/m/text-splitany.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,30 @@ Text.SplitAny(<b>text</b> as text, <b>separators</b> as text) as list
1313

1414
## About
1515

16-
Returns a list of text values resulting from the splitting a text value `text` based on any character in the specified delimiter, `separators`.
16+
Returns a list of text values resulting from the splitting of a text value based on any character specified in the delimiter.
17+
18+
* `text`: The text value to split.
19+
* `separator`: The delimiter characters used to split the text.
1720

1821
## Example 1
1922

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

2225
**Usage**
2326

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

2831
**Output**
2932

3033
```powerquery-m
3134
{
32-
"Jamie",
33-
"Campbell",
34-
"Admin",
35-
"Adventure Works",
36-
"www.adventure-works.com"
35+
"Name",
36+
"Customer ID",
37+
"Purchase",
38+
"Month",
39+
"Day",
40+
"Year"
3741
}
3842
```

0 commit comments

Comments
 (0)