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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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