Overview
These are specific time period calculations that are appropriate in the following areas:
- Traditional Financial Statements. e.g. Current Period-to-date, Last Month, Previous Year-to-Date
- Sales, Inventory (or Any Detail Data Model). e.g. Current Quarter-to-Date, Sales last 60 days
- Single Tile Metrics. e.g. Sales Yesterday
- Comparisons. e.g. Current Month-to-Date next to Previous Year Month-to-Date
The big difference between the ? Calendar Pattern Measures and the Calendar Specific Measures is that the ? Calendar Pattern Measures cover complete time periods, e.g. Year, Month whereas the Calendar Specific Measures generally cover aggregation of data up to a "today" or "to-date" period, e.g. Year-to-Date, or Month-to-Date - OR - aggregation of a specific whole time period e.g. Current Month, Last Month, Previous Year Month.
NOTE: Today's date is configured in the QQube Configuration Tool
Subcategories - Common
Here is a list of measures which are used in almost all data models. The majority are based upon transaction date. However Vehicle Mileage is based upon Trip End Date, and Payroll is based upon Effective Payroll Date.
Antecedent Measures | ||
Last Month | Full month previous to current month; current month is based upon Today's date. | |
Last Month-to-Date | Month-to-date previous to current month; to-date represents same day as Today's date; If the requested date is past the last day of the corresponding month, then the last day of the month is returned. | |
Last Quarter | Full quarter previous to current quarter; current quarter is based upon Today's date. | |
Last Quarter-to-Date | Quarter-to-date previous to current quarter; to-date represents same day as Today's date; If the requested date is past the last day of the corresponding month, then the last day of the month is returned. | |
Last Week | Full week previous to current week; current week contains Today's date. | |
Last Week-to-Date | Week-to-date previous to current week; to-date represents same week day as Today's date. | |
Current Measures | ||
Current Month | Full month with current month containing Today's date. | |
Current Month-to-Date | Month to Today's date. | |
Current Quarter | Full quarter actual amount with current quarter containing Today's Date. | |
Current Quarter-to-Date | Quarter to Today's date. | |
Current Week | Full week with current week containing Today's date. | |
Current Week-to-Date | Week to Today's date; Sunday is day one. | |
Current Year | Full year with current year containing Today's date. | |
Current Year-to-Date | Year to Today's date. | |
Current Year-to-Last Month | Year to end of month previous to current month; current month is based upon Today's date. | |
Previous Year Measures | ||
Previous Year | Full year previous to current year; current year contains Today's date. | |
Previous Year Last Month | Full month, 13 months previous to current month; current month is based upon Today's date. | |
Previous Year Last Quarter | Full quarter, 5 quarters previous to current quarter; current month is based upon Today's date. | |
Previous Year Month | Full month, 12 months previous to current month; current month is based upon Today's date. | |
Previous Year Month-to-Date | Month-to-date 12 months previous to current month-to-date; to-date represents same day as Today's date; If the requested date is past the last day of the corresponding month, then the last day of the month is returned. | |
Previous Year Quarter | Full quarter, 4 quarters previous to current quarter; current quarter contains Today's date. | |
Previous Year Quarter-to-Date | Quarter-to-date 12 months previous to current quarter-to-date; to-date represents same day as Today's date; If the requested date is past the last day of the corresponding month, then the last day of the month is returned. | |
Previous Year-to-Date | Year-to-date 12 months previous to current year-to-date; to-date represents same week day as Today's date; If the requested date is past the last day of the corresponding month, then the last day of the month is returned. | |
Previous Year-to-Last Month | Full month 13 months previous to current month; current month is based upon Today's date. | |
Today Measures | ||
Today | Today's date. | |
Tomorrow Measures | ||
Tomorrow | Today's date plus 1 day. | |
Yesterday | ||
Yesterday | Today's date minus 1 day. |
Subcategories - Extended Future Dates
These would be used (along with others) for:
- Expected Date (Open Purchase Orders)
- Ship Date (Open Sales Orders)
- Pending Builds
Extended Future Date Measures | ||
Next Month | Full month previous to current month; current month is based upon Today's date. | |
Next Quarter | Month-to-date previous to current month; to-date represents same day as Today's date; If the requested date is past the last day of the corresponding month, then the last day of the month is returned. | |
Next Week | Full quarter previous to current quarter; current quarter is based upon Today's date. | |
Next Two Weeks | Quarter-to-date previous to current quarter; to-date represents same day as Today's date; If the requested date is past the last day of the corresponding month, then the last day of the month is returned. | |
Next Year |
Subcategories - Inventory
These are used specifically in the Inventory Data Model
Sales Order (Original and Initial Invoiced) Measures | ||
Last 30 Days | Full month previous to current month; current month is based upon Today's date. | |
Last 365 Days | Month-to-date previous to current month; to-date represents same day as Today's date; If the requested date is past the last day of the corresponding month, then the last day of the month is returned. | |
Sales | ||
Last 30 Days | Full quarter previous to current quarter; current quarter is based upon Today's date. | |
Last 60 Days | Quarter-to-date previous to current quarter; to-date represents same day as Today's date; If the requested date is past the last day of the corresponding month, then the last day of the month is returned. |
Examples
Current Month Actual =
IF (
[[DAXP]] ShowValueForDates],
VAR todayselection = [[DAXP]] Today Selection]
VAR LastMonthAvailable =
CALCULATE (
MAX ( 'Calendar'[Year Month Number] ),
'Calendar'[Date] = todayselection
)
VAR Result =
CALCULATE (
[.Hierarchy Actual],
ALLEXCEPT (
'Calendar',
'Calendar'[Day Holiday Name],
'Calendar'[Day is Working Day],
'Calendar'[Day of Week Abbr]
),
'Calendar'[Year Month Number] = LastMonthAvailable,
ALL ( 'Calendar' )
)
RETURN
Result
)
Current Month-to-Date Actual =
IF (
[[DAXP]] ShowValueForDates],
VAR todayselection = [[DAXP]] Today Selection]
VAR LastMonthAvailable =
CALCULATE (
MAX ( 'Calendar'[Year Month Number] ),
'Calendar'[Date] = todayselection
)
VAR Result =
CALCULATE (
[.Hierarchy Actual],
ALLEXCEPT (
'Calendar',
'Calendar'[Day Holiday Name],
'Calendar'[Day is Working Day],
'Calendar'[Day of Week Abbr]
),
'Calendar'[Year Month Number] = LastMonthAvailable,
'Calendar'[SequentialDayNumber] <= todayselection,
ALL ( 'Calendar' )
)
RETURN
Result
)
We use three filter-safe columns which are always preserved regardless of all other filters applied to a measure:
- 'Calendar'[Day Holiday Name]
- 'Calendar'[Day is Working Day]
- 'Calendar'[Day of Week Abbr]
We added 'Day is Working Day' in Version 10
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article