@gkavesh ,
There’s three components to the solution, and we’ve got good existing content on each one that should provide you what you need:
- Find the previous appointment date, filtering out the excluded status types
This post provides the DAX code for how to do this. The example given excludes Saturday’s, Sundays and holidays, but it’s basically the equivalent of your excluded status types:
- Calculate the days difference between the current appointment date and the previous appointment date calculated in #1 above.
You already know how to do this, based on the work you’ve already done.
- Calculate the average days between given the filtering of excluded status types
This will require developing a virtual table of the client ID, date and days between to build out the appropriate context, and then force Power BI to average down the days between column. This video explains exactly how to do this:
This should give you what you need to solve this problem, but if you still have issues after reviewing the materials above, just give a shout and we can work through the specific solution together.
I hope this is helpful.
– Brian