Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jesperxmyrup
New Member

Normalize time series data to initialize at zero

Hi.

 

I have the following line chart with a cummulative PnL.

jesperxmyrup_0-1663920795265.png

 

My issue is that I want the line to start from zero no matter what time interval I am viewing with the slicer. So substracting the first PnL observation from the PnL time series.

 

I have two columns:

- Performance[PnL] (cummulative PnL)

- Performance[ValueDateTimeUTC] (Datetime column)

 

Thanks.

 

Best, 

Jesper

 

 

 

1 ACCEPTED SOLUTION
jesperxmyrup
New 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)

View solution in original post

3 REPLIES 3
jesperxmyrup
New 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)
jesperxmyrup
New Member

Hi @MahyarTF.

 

The problem is not to change the y-axis, but to scale the time series such that it starts at y=0. I am pretty sure there is no chart setting that can do this job, but a measure has to be created.

 

Best

Jesper

MahyarTF
Memorable Member
Memorable Member

Hi,

Use the Minimum Range for Y-axis in your chart :

MahyarTF_0-1663922447655.png

 

Appreciate your Kudus.

Please mark it as a solution if helps you.

Mahyartf

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.