Professional Documents
Culture Documents
Differences
Differences
Filters
1. Filtered Value
2. Difference from filtered Value
3. Percentage difference from filtered Value
4. Sales from new customers
Time Intelligence
Totals
1. Running Total
2. Total for Category (filters applied)
3. Total for Category (filters no applied)
Mathematical Operations
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Percentage difference
6. Correlation Coeffecient
Average per Category
YTD total
[ Sales YTD] =
IF(
ISFILTERED('dimdate'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the
Power BI-provided date hierarchy or primary date column."),
TOTALYTD(SUM('financials'[ Sales]), 'dimdate'[Date].[Date])
)
[ Sales QTD] =
IF(
ISFILTERED('dimdate'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the
Power BI-provided date hierarchy or primary date column."),
TOTALQTD(SUM('financials'[ Sales]), 'dimdate'[Date].[Date])
)
[ Sales MTD 4] =
IF(
ISFILTERED('dimdate'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the
Power BI-provided date hierarchy or primary date column."),
TOTALMTD(SUM('financials'[ Sales]), 'dimdate'[Date].[Date])
)
[ Sales YoY%] =
IF(
ISFILTERED('dimdate'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the
Power BI-provided date hierarchy or primary date column."),
VAR __PREV_YEAR =
CALCULATE(
SUM('financials'[ Sales]),
DATEADD('dimdate'[Date].[Date], -1, YEAR)
)
RETURN
DIVIDE(SUM('financials'[ Sales]) - __PREV_YEAR, __PREV_YEAR)
)
[ Sales MoM%] =
IF(
ISFILTERED('dimdate'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the
Power BI-provided date hierarchy or primary date column."),
VAR __PREV_MONTH =
CALCULATE(
SUM('financials'[ Sales]),
DATEADD('dimdate'[Date].[Date], -1, MONTH)
)
RETURN
[ Sales rolling average] =
IF(
ISFILTERED('dimdate'[Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the
Power BI-provided date hierarchy or primary date column."),
VAR __LAST_DATE = ENDOFQUARTER('dimdate'[Date].[Date])
VAR __DATE_PERIOD =
DATESBETWEEN(
'dimdate'[Date].[Date],
STARTOFQUARTER(DATEADD(__LAST_DATE, -1, QUARTER)),
ENDOFQUARTER(DATEADD(__LAST_DATE, 1, QUARTER))
)
RETURN
AVERAGEX(
CALCULATETABLE(
SUMMARIZE(
VALUES('dimdate'),
'dimdate'[Date].[Year],
'dimdate'[Date].[QuarterNo],
'dimdate'[Date].[Quarter]
),
__DATE_PERIOD
),
CALCULATE(
SUM('financials'[ Sales]),
ALL(
'dimdate'[Date].[MonthNo],
'dimdate'[Date].[Month],
'dimdate'[Date].[Day]
)
)
)
)
)
[ Sales running total in Date 2] =
CALCULATE(
SUM('financials'[ Sales]),
FILTER(
ALLSELECTED('dimdate'[Date]),
ISONORAFTER('dimdate'[Date], MAX('dimdate'[Date]), DESC)
)
)