AR Reserve Calculation

Hello,
I wanted to calculate AR Balance reserves with Power BI dax, calculation of reserves as follows

Days past term measure should be month end date minus due date
if Days past term greater than 60 and less 90 then Reserves will be 25% of AR balance
if Days past term greater than 90 and less 120 then Reserves will be 50% of AR balance
Days past term above 120 days Reserves 100% of AR Balance.

Questions

  1. How should be dax written so as to calculate days past term each month end date minus Due Date (we follow 4-4-5 calendar)
  2. I wanted to compare current month reserves with last month reserves (Last month reserves should remain intact meaning if any payment received during current should not impact my reserves)
  3. I have calculated reserves, but it is not working properly. When I filtered on month it just shows invoices for that month.
  4. I have written following dax to calculate reserves. However when filtered business unit it not showing currect numbers.
  5. currently I am calculating manual days past term manually.

SWITCH(TRUE(),

[Days Past Term Present] >= 61 && [Days Past Term Present] <= 91, [Balance] *0.25,

[Days Past Term Present] >= 92 && [Days Past Term Present] <= 121, [Balance] *0.5,

[Days Past Term Present] >= 122 , [Balance] *1

)


Screen.pdf (92.6 KB)