You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`tableName`|The name of an existing table, using standard DAX syntax. This parameter cannot be an expression. This parameter is optional. |
26
-
|`columnName`|The name of an existing column using standard DAX syntax, usually fully qualified. It cannot be an expression. This parameter is optional. |
25
+
|`tableName`|The name of an existing table using DAX syntax. This parameter cannot be an expression. This parameter is optional. |
26
+
|`columnName`|The name of an existing column using DAX syntax, usually fully qualified. It cannot be an expression. This parameter is optional. |
In the above example, note that the rows Grand Total numbers do not add up, this happens because the same order might contain line items, in the same order, from different product categories.
55
+
### Understanding distinct count totals
56
+
57
+
Distinct count totals are not additive. The Grand Total is not the sum of the values in each category.
58
+
59
+
In the table above, you might expect the Grand Total for 2005 (366) to equal the sum of Accessories (135) + Bikes (345) + Clothing (242) + Components (205) = 927. However, the actual Grand Total is 366, which is much lower.
60
+
61
+
This happens because the same order can appear in multiple categories. For example, if order #1001 contains both a bike and an accessory, that order is counted once in the Bikes column and once in the Accessories column. But when calculating the Grand Total for the row, order #1001 is only counted once because it's still just one distinct order.
62
+
63
+
This is the correct and expected behavior of distinct counts:
64
+
65
+
-**Category values**: Count distinct orders within that specific category only.
66
+
-**Row totals**: Count distinct orders across all categories for that year - each order is counted only once, regardless of how many categories it appears in.
67
+
-**Grand Total**: Count distinct orders across the entire dataset.
68
+
69
+
If you need totals that add up, consider using [COUNT](count-function-dax.md) or [COUNTROWS](countrows-function-dax.md) instead. However, be aware that these functions count rows, not distinct values, and will give different results.
Copy file name to clipboardExpand all lines: query-languages/dax/lcm-function-dax.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,14 +12,14 @@ Returns the least common multiple of integers. The least common multiple is the
12
12
## Syntax
13
13
14
14
```dax
15
-
LCM(number1, [number2], ...)
15
+
LCM(number1, number2)
16
16
```
17
17
18
18
### Parameters
19
19
20
20
|Term|Definition|
21
21
|--------|--------------|
22
-
|`number1, number2,...`|Number1 is required, subsequent numbers are optional. 1 to 255 values for which you want the least common multiple. If value is not an integer, it is truncated.|
22
+
|`number1, number2`|The two integers for which you want the least common multiple. If a value is not an integer, it is truncated.|
For date column input, Returns a table that contains a column of all dates from the previous year, given the last date in the `dates` column, in the current context.
10
+
For date column input, returns a table that contains a column of all dates from the previous year, based on the first date in the `dates` column, in the current context.
11
11
12
-
For calendar input, returns all dates from the previous year, based on the first date in the current context. The table contains all primary tagged columns and all time related columns
12
+
For calendar input, returns all dates from the previous year, based on the first date in the current context. The table contains all primary tagged columns and all time related columns.
13
13
14
14
## Syntax
15
15
@@ -31,7 +31,7 @@ For calendar input, a table that contains all primary tagged columns and all tim
31
31
32
32
## Remarks
33
33
34
-
- This function returns all dates from the previous year given the latest date in the input parameter. For example, if the latest date in the `dates` argument refers to the year 2009, then this function returns all dates for the year of 2008, up to the specified `year_end_date`.
34
+
- This function returns all dates from the previous year based on the first date in the input parameter. For example, if the first date in the `dates` argument refers to the year 2009, then this function returns all dates for the year of 2008, up to the specified `year_end_date`.
35
35
36
36
- The `dates` argument can be any of the following:
Copy file name to clipboardExpand all lines: query-languages/dax/time-intelligence-functions-dax.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,11 @@ Data Analysis Expressions (DAX) includes time-intelligence functions that enable
28
28
|[ENDOFYEAR](endofyear-function-dax.md)| Returns the last date of the year in the current context for the specified column of dates. |
29
29
|[FIRSTDATE](firstdate-function-dax.md)| Returns the first date in the current context for the specified column of dates. |
30
30
|[LASTDATE](lastdate-function-dax.md)| Returns the last date in the current context for the specified column of dates. |
31
-
|[NEXTDAY](nextday-function-dax.md)| Returns a table that contains a column of all dates from the next day, based on the first date specified in the dates column in the current context. |
32
-
|[NEXTWEEK](nextweek-function-dax.md)| Returns a table that contains a column of all dates from the next week, based on the first date in the dates column in the current context. |
33
-
|[NEXTMONTH](nextmonth-function-dax.md)| Returns a table that contains a column of all dates from the next month, based on the first date in the dates column in the current context. |
34
-
|[NEXTQUARTER](nextquarter-function-dax.md)| Returns a table that contains a column of all dates in the next quarter, based on the first date specified in the dates column, in the current context. |
35
-
|[NEXTYEAR](nextyear-function-dax.md)| Returns a table that contains a column of all dates in the next year, based on the first date in the dates column, in the current context. |
31
+
|[NEXTDAY](nextday-function-dax.md)| Returns a table that contains a column of all dates from the next day, based on the last date specified in the dates column in the current context. |
32
+
|[NEXTWEEK](nextweek-function-dax.md)| Returns a table that contains a column of all dates from the next week, based on the last date in the dates column in the current context. |
33
+
|[NEXTMONTH](nextmonth-function-dax.md)| Returns a table that contains a column of all dates from the next month, based on the last date in the dates column in the current context. |
34
+
|[NEXTQUARTER](nextquarter-function-dax.md)| Returns a table that contains a column of all dates in the next quarter, based on the last date specified in the dates column, in the current context. |
35
+
|[NEXTYEAR](nextyear-function-dax.md)| Returns a table that contains a column of all dates in the next year, based on the last date in the dates column, in the current context. |
36
36
|[OPENINGBALANCEWEEK](openingbalanceweek-function-dax.md)| Evaluates the expression at the first date of the week in the current context. |
37
37
|[OPENINGBALANCEMONTH](openingbalancemonth-function-dax.md)| Evaluates the expression at the first date of the month in the current context. |
38
38
|[OPENINGBALANCEQUARTER](openingbalancequarter-function-dax.md)| Evaluates the expression at the first date of the quarter, in the current context. |
@@ -42,7 +42,7 @@ Data Analysis Expressions (DAX) includes time-intelligence functions that enable
42
42
|[PREVIOUSWEEK](previousweek-function-dax.md)| Returns a table that contains a column of all dates representing the week that is previous to the first date in the dates column, in the current context. |
43
43
|[PREVIOUSMONTH](previousmonth-function-dax.md)| Returns a table that contains a column of all dates from the previous month, based on the first date in the dates column, in the current context. |
44
44
|[PREVIOUSQUARTER](previousquarter-function-dax.md)| Returns a table that contains a column of all dates from the previous quarter, based on the first date in the dates column, in the current context. |
45
-
|[PREVIOUSYEAR](previousyear-function-dax.md)| Returns a table that contains a column of all dates from the previous year, given the last date in the dates column, in the current context. |
45
+
|[PREVIOUSYEAR](previousyear-function-dax.md)| Returns a table that contains a column of all dates from the previous year, based on the first date in the dates column, in the current context. |
46
46
|[SAMEPERIODLASTYEAR](sameperiodlastyear-function-dax.md)| Returns a table that contains a column of dates shifted one year back in time from the dates in the specified dates column, in the current context. |
47
47
|[STARTOFWEEK](startofweek-function-dax.md)| Returns the first date of the week in the current context for the specified column of dates. |
48
48
|[STARTOFMONTH](startofmonth-function-dax.md)| Returns the first date of the month in the current context for the specified column of dates. |
Copy file name to clipboardExpand all lines: query-languages/dax/today-function-dax.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,11 @@ A date (`datetime`).
21
21
22
22
## Remarks
23
23
24
-
- The TODAY function is useful when you need to have the current date displayed on a worksheet, regardless of when you open the workbook. It is also useful for calculating intervals.
24
+
- The TODAY function is useful when you need to have the current date displayed in a report, regardless of when you open it. It is also useful for calculating intervals.
25
25
26
-
- If the TODAY function does not update the date when you expect it to, you might need to change the settings that control when the column or workbook is refreshed..
26
+
- If the TODAY function does not update the date when you expect it to, you might need to change the settings that control when the report or semantic model is refreshed.
27
27
28
-
- The NOW function is similar but returns the exact time, whereas TODAY returns the time value 12:00:00 PM for all dates.
28
+
- The NOW function is similar but returns the exact time, whereas TODAY returns the time value 12:00:00 AM (midnight) for all dates.
0 commit comments