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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
My scenario: I have a date table spanning 10 years, on this table are also marked major holidays; on another table are dates and some value for each date. I need to filter the second table by the first table with an optional offset value. For example, if I filter for Halloween I want to know the value of my second table for each Halloween of the previous 10 years (this is easy and I have solved this), but if I also set an offset of +1, -3, +4 etc, I want to know instead what the value was on the day after Halloween, three days before halloween, four days after hallowen, etc. I've tried various combinations of filtering and lookupvalue and keep getting errors or no results, for example
Any help would be greatly appreciated, the offset portion is proving very challenging.
Solved! Go to Solution.
try this one,it makes use of TREATAS:
https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/
ValueHoliday =
VAR _offset =
SELECTEDVALUE ( OFFSET[VALUE] )
VAR _dates =
VALUES ( Holidays[Index] )
VAR _dates_offset =
SELECTCOLUMNS (
ADDCOLUMNS ( _dates, "@offset", [Index] + _offset ),
"@offset", [@offset]
)
RETURN
CALCULATE (
SUM ( Table2[Column2] ),
TREATAS ( _dates_offset, DateTable[Index] )
)
try this one,it makes use of TREATAS:
https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/
ValueHoliday =
VAR _offset =
SELECTEDVALUE ( OFFSET[VALUE] )
VAR _dates =
VALUES ( Holidays[Index] )
VAR _dates_offset =
SELECTCOLUMNS (
ADDCOLUMNS ( _dates, "@offset", [Index] + _offset ),
"@offset", [@offset]
)
RETURN
CALCULATE (
SUM ( Table2[Column2] ),
TREATAS ( _dates_offset, DateTable[Index] )
)
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!