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.
Hello - v-yinliw-msft
I've just come across this solution and it looks to work for me as well however I'm wanting to try expand on it slightly. I need the measure to ignore any blanks if this is possible but struggling!
So where I have used TEST A, not always does this have a value and these to be ignored and to just show me the most recent date where the value of TEST A is not blank. Then in a visual I would want to display the value of TEST A.
Most Recent TEST A =
CALCULATE (
MAX ('Data!'[TEST A]),
FILTER ( 'Data!', 'Data!'[DATE-OF-TESTING] = [TEST A] )
)