June 24, 2020
Greetings, Hope all is well! Please refer to the attached image:
I am trying to create a DAX that would give me YES, if all conditions are met.
A. If all have same project name (column E)
B. If all have same PatientID (column C)
C. If Clinic in one Row is “ER Clinic” and in other rows any other clinic (Column A)
D. AND the date of ER Clinic “InvoiceDate” must be equal to OR lower than any other clinic Date by only 2 days (column B)
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
Hi Nawaf,
What's the expected result? None of your sample records is matching the criteria.
Also, if for example there are 5 clinics other than ER, with dates difference of 20, 15, 10, 5, 2 days, how can be the ER Clinic date equal or lower than 2 days to ANY other clinic? Or you meant "if there is at least 1 clinic other than ER within 2 days"?
June 24, 2020
Greetings Sir! and thank you for your reply.
What's the expected result?
Response: if all criteria are met, I get a YES.
Also, if for example there are 5 clinics other than ER, with dates difference of 20, 15, 10, 5, 2 days, how can be the ER Clinic date equal or lower than 2 days to ANY other clinic? Or you meant "if there is at least 1 clinic other than ER within 2 days"?
Sometimes, patients only go to ER clinics, without being referred to another clinic.
Really appreciate it!
1 Guest(s)