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
Hello - can anyone tell me why this DAX is not working when i use to try and create a calculation group...? Thanks in advance!
VAR date =
MAX ( BO_data[Reference_Date] )
VAR LastDec =
DATE ( YEAR ( ( date ) - 1 ), MONTH ( 12 ), DAY ( date ) )
VAR RESULT =
CALCULATE (
SELECTEDMEASURE (),
FILTER ( 'Calendar', 'Calendar'[Date] <= LastDec )
)
RETURN
RESULT
Solved! Go to Solution.
@Anonymous , try like
VAR _date =
MAXX (allselcted( BO_data), BO_data[Reference_Date] )
VAR LastDec = DATE ( YEAR ( ( _date ) - 1 ), 12 , DAY ( _date ) )
VAR RESULT =
CALCULATE (
SELECTEDMEASURE (),
FILTER (all( 'Calendar'), 'Calendar'[Date] <= LastDec )
)
RETURN
RESULT
if needed remove all from calendar
@Anonymous , try like
VAR _date =
MAXX (allselcted( BO_data), BO_data[Reference_Date] )
VAR LastDec = DATE ( YEAR ( ( _date ) - 1 ), 12 , DAY ( _date ) )
VAR RESULT =
CALCULATE (
SELECTEDMEASURE (),
FILTER (all( 'Calendar'), 'Calendar'[Date] <= LastDec )
)
RETURN
RESULT
if needed remove all from calendar
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 |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 32 | |
| 31 | |
| 20 | |
| 12 | |
| 12 |