Forum Discussion
jesperxmyrup
3 years agoNew Member
Normalize time series data to initialize at zero
Hi. I have the following line chart with a cummulative PnL. My issue is that I want the line to start from zero no matter what time interval I am viewing with the slicer. So substractin...
- 3 years ago
I think I finally found the solution:
The following measure did the job:ScaledToZero = VAR min_val = CALCULATE(Min(Performance[ValueDateTimeUTC]), ALLSELECTED(Performance[ValueDateTimeUTC], Performance[PnL])) RETURN Min(Performance[PnL]) - CALCULATE( SUM(Performance[PnL]),Performance[ValueDateTimeUTC] = min_val)
jesperxmyrup
3 years agoNew Member
I think I finally found the solution:
The following measure did the job:
ScaledToZero =
VAR min_val = CALCULATE(Min(Performance[ValueDateTimeUTC]), ALLSELECTED(Performance[ValueDateTimeUTC], Performance[PnL]))
RETURN
Min(Performance[PnL]) - CALCULATE(
SUM(Performance[PnL]),Performance[ValueDateTimeUTC] = min_val)