Calculated measure incorrect in line graph due to sorting with multiple dimensions
I have a line chart showing DSO (current month A/R divided by total revenue over last 3 months divided by 90) trending over time. The calculation works fine when I just have the data points plotted by project, but when I try to add the dimension of Payor Category, to split out each project even further, the calculations get thrown off due to the sorting order. When I display the data in the table, if I sort by Payor Category, and then by Month/Date as the last sorted value, the calculation is correct. However, in the line graph, it defaults to the month/date being the first sorted value, and I cannot reorder them. I've tried a number of different things, but I'm still very new to all of this so any help would be appreciated!
Here's the calculation (The chart is also only showing data for the last 6 months):