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.
Hi!
I am using the following slicer to select two date ranges that will then filter the cards to show specific data about the two selected months. What is an easy way to do the calculations by the selected filters? (I thought I had figured it out by using the TOP N in the filter but the numbers are not accurate).
Thank you!
Monica
Solved! Go to Solution.
Hi, @mkurup12 ,
depends if you use Date Table or if the Month Slicer represents a date, but generally, you can apply something like data between intervals like this:
BelongsToIntervalhMeasure =
var _endOfInterval = MAX(DateTable[Date])
var _startOfInterval = MIN(DateTable[Date])
var _IntervalCheck = if(MAX([AdmitDate]) <= _endOfInterval && MAX(Admissions[DischargDateFixed]) >= _startOfInterval, "Something")
return _IntervalCheck
Hi, @mkurup12 ,
depends if you use Date Table or if the Month Slicer represents a date, but generally, you can apply something like data between intervals like this:
BelongsToIntervalhMeasure =
var _endOfInterval = MAX(DateTable[Date])
var _startOfInterval = MIN(DateTable[Date])
var _IntervalCheck = if(MAX([AdmitDate]) <= _endOfInterval && MAX(Admissions[DischargDateFixed]) >= _startOfInterval, "Something")
return _IntervalCheck
Hi @mkurup12
You can use SELECTEDVALUE of month column in VARIABLE
and in RETURN section, you can use (like that)
_var = "Jan", "Your expected result",
_var = "Dec", "Your expected result",
"default result")
Please share sample data or pbix file, so I can provide proper dax
If you have any question, please keep posted
If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos
Proud to be a Super User! | |
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.