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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register 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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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