Forum

DAX multi condition...
 
Notifications
Clear all

DAX multi conditions from different rows.

3 Posts
2 Users
0 Reactions
67 Views
(@countryfan_nt)
Posts: 18
Eminent Member
Topic starter
 

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)

Really Thank you so much in advance for your time & effortsCapture-1.PNG

 
Posted : 19/01/2023 6:10 am
(@catalinb)
Posts: 1937
Member Admin
 

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"?

 
Posted : 21/01/2023 8:34 am
(@countryfan_nt)
Posts: 18
Eminent Member
Topic starter
 

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!

 
Posted : 23/01/2023 7:21 am
Share: