I'll explain the expression with an example, if I select August as current month, it holds the transactionIDs that have AAA rating and apply to July. So TransactionIDs can have different ratings in July but still holds the same transactionIDs and sum up those transactions' sales on July.
Second expression has same concept but comparing August with (month-2) June. I am drawing those three lines and bars in chart but I am having different number of transactions for August, July, and June. I believed if I wrote the expression right, I should have same number of transactions.
Since I am new to indirect set analysis, I appreciate comments and advice.