I want to write a measure in PowerBI (DAX) to compare data within the same table.
I am looking for a DAX formula that checks whether a ContactID has an AppointmentType A and an AppointmentType B. The condition is that AppointmentType B needs to be on the same day or after Appointment A, but not more then 3 months.
The formula should return the number of matches. In the example table it should return 1 since only ContactID 002 meets the criteria.