Forum Discussion
Occupany, Culmulative total help
I basically need it to do a running total, but if the total goes below zero then to make it zero, as i dont want the occupancy levels going into minus 🙂
Hi molzmad ,
It's not clear to me. I did a test. Is the following result what you want?
Column =
VAR x1 =
CALCULATE (
SUM ( 'Enliteon_Office_Test Count_Events'[Ins_Outs] ),
FILTER (
ALL ( 'Enliteon_Office_Test Count_Events' ),
[Custom] <= EARLIER ( 'Enliteon_Office_Test Count_Events'[Custom] )
)
)
RETURN
IF ( x1 < 0, 0, x1 )
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- molzmad5 years ago
Helper I
Hi,
Yes thats right, but how come it doesnt start counting from the beggining i.e. top row? Is there anyway to implement this? For example its counting some of the ins as 0- Anonymous5 years agoNot applicable
Hi molzmad ,
Thanks for your reply. I think it does count from the beginning. You can sort the "timestamp" column ascending.
Result:
Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- molzmad5 years ago
Helper I
Hi,
yeah it does seem to work but i mean for example you have put above, in the second row, the value for Ins_Outs = 1, so "column" should = 1 if that makes sense ?