March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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 to pull through the most recent visit for each case that happened before the max date on the date slicer. I can get the most recent visit but can't filter by the slicer.
Using MAX(DateDimension[Date]) in a coulumn just shows the highest date in the date dimension unless I do that as a measure.
Solved! Go to Solution.
Thanks for all the input.
I everntually got it sorted myself using
[Max Date] was from another measure
Thanks for all the input.
I everntually got it sorted myself using
[Max Date] was from another measure
Filtered:
You were really close. Just change your MAX field to the fact table, rather than the date table.
Hi, @Mark_Adams
Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You don't have to, the measure will have a context filer from the slicer on the report page.
Unfortunately I can't get TOPN to work at all. It keeps telling me the expression refers to multiple values that cannot be converted to a scalar value
Try using TOPN in DAX Measure
TOPN DAX Function: How it works in Power BI? Comparison against the top group - RADACAD
that looks like a nice function but I can't work out how to restrict it to visits before the MAX(DateDimension[Date])
User | Count |
---|---|
120 | |
78 | |
58 | |
52 | |
46 |
User | Count |
---|---|
170 | |
117 | |
63 | |
58 | |
51 |