Forum Discussion
Robin96
2 years agoHelper II
Running total problem
i have a switch case that is showing different values for each row in a matrix i have a table that shows the income, expenses and my cashflow per week. This is how the matrix should show values...
JamesFR06
2 years agoResolver IV
Hi
Please try this
Cashflow =
VAR minweek =
MIN ( RT[Week] )
VAR Firstcash =
CALCULATE ( MAX ( RT[Cash Balance] ), RT[Week] = minweek, ALL ( rt ) )
VAR Activweek = RT[Week]
VAR RTotal =
CALCULATE (
SUM ( RT[Net Cashflow] ),
RT[Week] > minweek
&& RT[Week] <= Activweek,
ALL ( RT )
)
VAR result =
IF ( Activweek = minweek, Firstcash, RTotal + Firstcash )
RETURN
result
Robin96
2 years agoHelper II
Hey,
Thanks for the response! This did not generate the desired outcome. i dont have every column in the same table as you have here.
i also get an error on the syntax at "Activweek" not sure why, guess it needs an expression.
- JamesFR062 years agoResolver IV
Sorry I do not realize that you got informations in different tables
For Activweek, as you put it on a matrix use the selectedvalue(Date[Week])