Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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