Forum Discussion
Return Data based on the most recent date
- 3 years ago
Hi ryan_b_fiting,
You can try this method:
New two measures:
Last Visit = CALCULATE ( MAX ( 'Appointment'[Visit Date] ), FILTER ( 'Appointment', 'Appointment'[PatientID] ) )Last Visit Type = CALCULATE ( MAX ( Appointment[Visit Type] ), FILTER ( 'Appointment', 'Appointment'[Visit Date] = [Last Visit] ) )Then in table visual:
Hope this helps you. Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi ryan_b_fiting,
You can try this method:
New two measures:
Last Visit =
CALCULATE (
MAX ( 'Appointment'[Visit Date] ),
FILTER ( 'Appointment', 'Appointment'[PatientID] )
)
Last Visit Type =
CALCULATE (
MAX ( Appointment[Visit Type] ),
FILTER ( 'Appointment', 'Appointment'[Visit Date] = [Last Visit] )
)
Then in table visual:
Hope this helps you. Here is my PBIX file.
Best Regards,
Community Support Team _Yinliw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This works great for one piece of the report that I am working on. Now there is a branch off of this measure that I am trying to create with the same concept. The only cavaet to this is I have a Relative Date filter that is for the next 7 days of future appointments (look ahead schedule for my providers), how can I create a new measure that will still give me the Patients last visit and last visit type prior to the 7 day look ahead schedule?