Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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 times because they had multiple visits. How would I create a formula that will only bring back the most recent visit? Below are the fields I am using. Thank you in advance!
Solved! Go to Solution.
Thanks to everyone who responded!
I figured out the answer ...
Thanks to everyone who responded!
I figured out the answer ...
Hi
I would create a latest visit column using the following DAX and use the column as a filter on your report:
@jonnyA , Create a measure like this and try
Measure =
VAR __id = MAX ('Table'[Patient Last Name, First Name] )
VAR __date = CALCULATE ( MAX('Table'[App Date Time] ), ALLSELECTED ('Table' ), 'Table'[Patient Last Name, First Name] = __id )
CALCULATE ( MAx ('Table'[App Date Time] ), VALUES ('Table'[Patient Last Name, First Name] ),'Table'[Patient Last Name, First Name] = __id,'Table'[App Date Time] = __date )
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |