Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
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! | |
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 79 | |
| 48 | |
| 35 | |
| 31 | |
| 27 |