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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors