Forum Discussion
Mark_Adams
2 years agoFrequent Visitor
Latest visit based on slicer date
I have a dataset called 'CP Visits' with Case ID and Visit Date. Each case will have several visit dates. There is also a date slicer set to 'between' with dates supplied by a date dimension. I want ...
- 2 years ago
Thanks for all the input.
I everntually got it sorted myself using
Most Recent Visit Date =CALCULATE(MAX('CP Visits'[Visit Date]),FILTER('CP Visits','CP Visits'[Visit Date] <= [Max Date]&& 'CP Visits'[Case ID] = SELECTEDVALUE('CP Visits'[Case ID])))[Max Date] was from another measure
= MAXX(ALLSELECTED(DateDimension[Date]), DateDimension[Date])
Anonymous
2 years agoNot applicable
Try using TOPN in DAX Measure
TOPN DAX Function: How it works in Power BI? Comparison against the top group - RADACAD
Mark_Adams
2 years agoFrequent Visitor
that looks like a nice function but I can't work out how to restrict it to visits before the MAX(DateDimension[Date])