Forum Discussion
Accumulate calculated value over time
- Anonymous4 years ago
i finally found a solution for me and i will guide you through the steps :
first i created a net profit measureNet Profit = VAR Totalrevenue = Calculate(SUM(Revenue[Amount])) VAR Payroll = CALCULATE(SUM(Expenses[Amount]),FILTER(Expenses,Expenses[Category] = "Payroll Expenses")) VAR Business = CALCULATE(SUM(Expenses[Amount]),FILTER(Expenses,Expenses[Category] = "Business Expenses")) VAR Financial = CALCULATE(SUM(Expenses[Amount]),FILTER(Expenses,Expenses[Category] = "Financial Fees")) Var Totalexpense = Calculate(SUM(Expenses[Amount])) Var Grossprofit = (Totalrevenue - Totalexpense) VAR Taxes = (Totalrevenue * 0.15) VAR Netprofit = Grossprofit - Taxes Return Netprofit
later i created a "before" measure that calculates all net profit from my inital date to selected date in the following measure :before = VAR seldate = MAX(DateTable[Date]) RETURN CALCULATE([Net Profit],DATESBETWEEN(DateTable[Date],"8/1/2022",seldate))
Then i made my current payout which isCurrent Payout = [Net Profit] * MAX(Investors[Percentage])
and finally i have the total payout which is :Total Payout = ([before] * MAX(Investors[Percentage])) + MAX(Investors[Initial Value])
here are some photos of my results :
for week 1 :
for week 2:
all is left is for me to create a previous payout measure which i already know how to solve half of it i just need a similar calcualtion to the "before" measure but he seldate is 1 week before can anyone help?
i finally found a solution for me and i will guide you through the steps :
first i created a net profit measure
Net Profit =
VAR Totalrevenue = Calculate(SUM(Revenue[Amount]))
VAR Payroll = CALCULATE(SUM(Expenses[Amount]),FILTER(Expenses,Expenses[Category] = "Payroll Expenses"))
VAR Business = CALCULATE(SUM(Expenses[Amount]),FILTER(Expenses,Expenses[Category] = "Business Expenses"))
VAR Financial = CALCULATE(SUM(Expenses[Amount]),FILTER(Expenses,Expenses[Category] = "Financial Fees"))
Var Totalexpense = Calculate(SUM(Expenses[Amount]))
Var Grossprofit = (Totalrevenue - Totalexpense)
VAR Taxes = (Totalrevenue * 0.15)
VAR Netprofit = Grossprofit - Taxes
Return
Netprofit
later i created a "before" measure that calculates all net profit from my inital date to selected date in the following measure :
before = VAR seldate = MAX(DateTable[Date])
RETURN
CALCULATE([Net Profit],DATESBETWEEN(DateTable[Date],"8/1/2022",seldate))
Then i made my current payout which is
Current Payout =
[Net Profit] * MAX(Investors[Percentage])
and finally i have the total payout which is :
Total Payout = ([before] * MAX(Investors[Percentage])) + MAX(Investors[Initial Value])
here are some photos of my results :
for week 1 :
for week 2:
all is left is for me to create a previous payout measure which i already know how to solve half of it i just need a similar calcualtion to the "before" measure but he seldate is 1 week before can anyone help?