Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Logins R6M =
VAR _noMonths = 6
VAR _lastSelectedDate = MAX('Date'[Date])
VAR _period =
DATESINPERIOD( 'Date'[Date], _lastSelectedDate, -_noMonths, MONTH)
VAR _result =
CALCULATE(
AVERAGEX(
VALUES('Date'[Fiscal Month Number]),
[Logins (sum)]
),
_period
)
VAR _lastDateWithLogin = MAX( 'Monthly User Activity by Project'[Date])
VAR _firstVisibleDate = MIN('Date'[Date])
RETURN
IF( _firstVisibleDate <= _lastDateWithLogin, _result)
Logins R6M (filter) =
VAR _noMonths = 6
VAR _lastSelectedDate = MAX('Date'[Date])
VAR _period =
CALCULATETABLE(
DATESINPERIOD(
'Date'[Date],
_lastSelectedDate,
-_noMonths,
MONTH
),
ALL('Date'[Date])
)
VAR _result =
CALCULATE(
AVERAGEX(
VALUES('Date'[Fiscal Month Number]),
[Logins (sum)]
),
_period
)
VAR _lastDateWithLogin = MAX( 'Monthly User Activity by Project'[Date])
VAR _firstVisibleDate = MIN('Date'[Date])
RETURN
IF( _firstVisibleDate <= _lastDateWithLogin, _result)
If my logic is correct, that is I do need to extend the period outside the scope of the Page Slicer, then why do both measures return the exact same values for the first dates shown. There should be at least some deviation between the two measures for the first 'period', eventually coming into alignment the further away you get from the 'start'.
Hi @rpiboy_1,
Yes, DATESINPERIOD respects the slicer context, so it won't include dates outside the slicer range, which might cause inaccuracies. Your version with CALCULATETABLE and ALL('Date'[Date]) is better because it ensures all needed dates are considered for accurate rolling averages.
Did I answer your question? If so, please mark my post as the solution!✔️
Your Kudos are much appreciated! Proud to be a Responsive Resident!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |