I’ll offer a tip here. There are a lot of records in the Status History table with the same Complaint ID and Complaint Status ID, but a different date. Those latter records are not useful in computing the duration between stages and actually make the DAX quite a bit more difficult. If you remove them (but keeping the one with the earliest Status Date) it makes calculating the duration between stages much easier through the use of the Previous Value DAX pattern.
For example, in the screenshot below, keep the records in the green boxes and get rid of the records in the red boxes.
- Brian