Forum Discussion
jonnyA
Responsive Resident
5 years agoFormula for pulling most recent patient visit
Hello! Looking for help to create a formula that will bring back the most recent patient visit. For example, I have an excel file with 20,000 patient names, many of the patients are listed multiple...
- 5 years ago
Thanks to everyone who responded!
I figured out the answer ...
Max Date = (MAX('ApptDetail'[Appt DateTime]))
BI_Jo
Resolver III
5 years agoHi
I would create a latest visit column using the following DAX and use the column as a filter on your report:
LatestVisitColumn =
if('TableName'[Appt DateTime] = CALCULATE(MAX('TableName'[Appt DateTime]),
if('TableName'[Appt DateTime] = CALCULATE(MAX('TableName'[Appt DateTime]),
ALLEXCEPT('TableName','TableName'[Patient ID Field])), "Yes", "No")
The column will say "Yes" if it is the patients latest visit.
The column will say "Yes" if it is the patients latest visit.
Hope that helps
Jo