I have a table showing the number of days different users will be using different apps. I need to assume the same start date for each user with the daily cost for the app being split equally accross the users still using it.
I’ve tried lots of methods like rank, index but can’t make this work.
The below example shows my expected outcome. (Note: I have many more users/ apps in my actual table).
For example for app 4, all three users split the first 30 days (3000/3=1000), u1 and u2 split the next 60 days (6000/2=3000) and u1 pays for the final 60 days (6000).