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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hello,
I'm trying to create a measure to apply a filter for the dates around a selected date in a date table ('Date Table') based on a selected date in the filter.
Functionally i would like to have it as either a 1 or a 0 to apply the filter on if the date is +/- 3 days on either side of the slicer. So if the chosen date is Jan 10, 2020, i would like the measure to be 1 for Jan 7, 2020 to Jan 13, 2020, and all other dates in the table to be 0. In the base case of no selection i would probably just want it to be a 1 if possible. My hope is to have this as a measure within the 'Date Table' so i can just pop this into other pages as required.
Any suggestions? I can get the selected value with SELECTEDVALUE, but its the application of the 1/0 thats got me stumped for the measure side.
thanks!
@cody_s think you need to date table, the table on slicer should have not relationship, then put one in the slicer, another one in your visual, like this
@cody_s , Try a measure like
new measure =
var _max = maxx(allselected('Date'),'Date'[Date])+3
var _min = maxx(allselected('Date'),'Date'[Date])-3
return
calculate( sum(Table[Value]), filter(all(Date),'Date'[Date] >=_min && 'Date'[Date] <=_max))
Thats not quite the solution that i'm thinking of. I'm thinking of a measure thats either 1 or 0 so i can apply it as a filter on my table as an "equals 1"
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |