Overview
QQube Intermediate Measures use names beginning with [DAXP and are hidden from normal report-building views.
They perform reusable technical calculations that support other DAX measures. They are not intended to be placed directly in a visual or report.
Intermediate Measure Functions
Visualization Control Measures
These measures control the date range displayed by other calculations.
For example, a cumulative line should stop at the last applicable date instead of continuing as a flat line through future calendar dates.
| Measure | Purpose |
|---|
| [DAXP] Today Selection | Retrieves the Today Date defined in the QQube Configuration Tool. It is used by to-date measures. |
| [DAXP] ShowValueForTransactionDates | Returns TRUE for dates through the last date containing data and FALSE for later dates. It is generally used by Calendar Pattern Measures. |
Cumulative Period Measures
These hidden measures accumulate values through the end of the selected period category.
For the latest period in the category, the accumulation stops at the Today Date defined in the QQube Configuration Tool.
| Measure | Accumulation Behavior |
|---|
| [DAXP-WTD] Cumulative By Week | Accumulates each day through the end of the week. |
| [DAXP-MTD] Cumulative By Month | Accumulates each day through the end of the month. |
| [DAXP-QTD] Cumulative By Quarter | Accumulates each day through the end of the quarter. |
| [DAXP-YTD] Cumulative By Year | Accumulates each day through the end of the year. |
Filter-Safe Calendar Components
QQube preserves three calendar columns when other calendar filters are removed inside cumulative calculations:
- 'Calendar'[Day Holiday Name]
- 'Calendar'[Day is Working Day]
- 'Calendar'[Day of Week Abbr]
Version 10 Addition
'Calendar'[Day is Working Day] was added to the filter-safe columns in QQube Version 10.
DAX Examples
Today Selection
[[DAXP]] Today Selection] = IF ( HASONEVALUE ( Company[QQube Today Date] ), VAR TodayChoice = VALUES ( Company[QQube Today Date] ) VAR Result = TodayChoice RETURN Result, TODAY () )
Show Values Through the Last Transaction Date
[[DAXP]] ShowValueForDates] = VAR LastDateWithData = CALCULATE ( MAX ( 'PROFIT AND LOSS MEASURES'[LinkToTxnDateID] ), ALL ( 'PROFIT AND LOSS MEASURES'[LinkToTxnDateID] ) ) VAR FirstDateVisible = MIN ( 'Calendar'[LinkForTxnDateID] ) VAR Result = FirstDateVisible <= LastDateWithData RETURN Result
Cumulative by Week
[[DAXP-WTD]] Cumulative by Week Actual] = IF ( [[DAXP]] ShowValueForDates], VAR LastDayAvailable = MAX ( 'Calendar'[Day Number in Week] ) VAR LastWeekAvailable = MAX ( 'Calendar'[Year Week Number] ) VAR Result = CALCULATE ( [.Hierarchy Actual], ALLEXCEPT ( 'Calendar', 'Calendar'[Day Holiday Name], 'Calendar'[Day is Working Day], 'Calendar'[Day of Week Abbr] ), 'Calendar'[Day Number in Week] <= LastDayAvailable, 'Calendar'[Year Week Number] = LastWeekAvailable ) RETURN Result )
Cumulative by Month
[[DAXP-MTD]] Cumulative by Month Actual] = IF ( [[DAXP]] ShowValueForDates], VAR LastDayAvailable = MAX ( 'Calendar'[Day Number in Month] ) VAR LastMonthAvailable = MAX ( 'Calendar'[Year Month Number] ) VAR LastYearAvailable = MAX ( 'Calendar'[Year Number] ) VAR Result = CALCULATE ( [.Hierarchy Actual], ALLEXCEPT ( 'Calendar', 'Calendar'[Day Holiday Name], 'Calendar'[Day is Working Day], 'Calendar'[Day of Week Abbr] ), 'Calendar'[Day Number in Month] <= LastDayAvailable, 'Calendar'[Year Month Number] = LastMonthAvailable, 'Calendar'[Year Number] = LastYearAvailable ) RETURN Result )
Cumulative by Quarter
[[DAXP-QTD]] Cumulative by Quarter Actual] = IF ( [[DAXP]] ShowValueForDates], VAR LastDayAvailable = MAX ( 'Calendar'[Day Number in Year] ) VAR LastFiscalYearQuarterAvailable = MAX ( 'Calendar'[Year Quarter Number] ) VAR LastYearAvailable = MAX ( 'Calendar'[Year Number] ) VAR Result = CALCULATE ( [.Hierarchy Actual], ALLEXCEPT ( 'Calendar', 'Calendar'[Day Holiday Name], 'Calendar'[Day is Working Day], 'Calendar'[Day of Week Abbr] ), 'Calendar'[Day Number in Year] <= LastDayAvailable, 'Calendar'[Year Quarter Number] = LastFiscalYearQuarterAvailable, 'Calendar'[Year Number] = LastYearAvailable ) RETURN Result )
Cumulative by Year
[[DAXP-YTD]] Cumulative by Year Actual] = IF ( [[DAXP]] ShowValueForDates], VAR LastDayAvailable = MAX ( 'Calendar'[Day Number in Year] ) VAR LastYearAvailable = MAX ( 'Calendar'[Year Number] ) VAR Result = CALCULATE ( [.Hierarchy Actual], ALLEXCEPT ( 'Calendar', 'Calendar'[Day Holiday Name], 'Calendar'[Day is Working Day], 'Calendar'[Day of Week Abbr] ), 'Calendar'[Day Number in Year] <= LastDayAvailable, 'Calendar'[Year Number] = LastYearAvailable ) RETURN Result )
Expected Result
Intermediate Measures provide reusable date-selection, visualization-control, and cumulative-period logic for other QQube measures. They remain hidden because they support finished measures rather than serving as report fields themselves.