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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
msa_007
Frequent Visitor

Future dated forecast

Hi All,

 

I have a line chart with a reducing value up to today's date and I would like to forecast the data points for future dates based upon a rate of decrease (e.g. 5%), until the value reaches zero.

 

I am a little in the dark on how to do this so any advice would be useful..  I have tried various things but none of those attempts have worked properly.  I would prefer not to use the in-built forecast feature of a line chart.

 

Pic1.jpg

Rate of Decrease = 
    var FirstValue = 
        MAXX(
            VALUES('Date'[Date]),
            [Handover Countdown]
        )
    var LastValue = 
        MINX(
            VALUES('Date'[Date]),
            [Handover Countdown]
        )    
RETURN
( FirstValue - LastValue ) / (1- LastValue)

 

Many thanks.

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @msa_007 

You can try this measure to solve your need.

vyaningymsft_3-1727676391548.png

 

vyaningymsft_1-1727676338129.png

 

Rate of Decrease = 
VAR _FirstValue =
    CALCULATE ( MAXX ( VALUES ( 'Date'[Date] ), [Measure] ), ALL ( 'Table' ) )
VAR _LastValue =
    CALCULATE ( MINX ( VALUES ( 'Date'[Date] ), [Measure] ), ALL ( 'Table' ) )
VAR _dayDiff =
    CALCULATE ( DATEDIFF ( MIN ( 'Date'[Date] ), TODAY (), DAY ), ALL ( 'Table' ) )
VAR _valueDiffBefore = _LastValue - _FirstValue
VAR _decrementalValue =
    DIVIDE ( _valueDiffBefore, _dayDiff )
VAR _daysFeature =
    DIVIDE ( _LastValue, - _decrementalValue )
VAR _endDate =
    TODAY () + _daysFeature
VAR _dayDiffAfter =
    DATEDIFF ( TODAY (), SELECTEDVALUE ( 'Date'[Date] ), DAY )
VAR _dayAddDecrementalValue =
    IF (
        _dayDiffAfter > 0
            && _dayDiffAfter <= _endDate,
        _LastValue + _dayDiffAfter * _decrementalValue
    )
RETURN
    SWITCH (
        TRUE (),
        SELECTEDVALUE ( 'Date'[Date] ) <= TODAY (), SELECTEDVALUE ( 'Table'[Value] ),
        _dayAddDecrementalValue
    )

 

Best Regards,
Yang

Community Support Team

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi, @msa_007 

You can try this measure to solve your need.

vyaningymsft_3-1727676391548.png

 

vyaningymsft_1-1727676338129.png

 

Rate of Decrease = 
VAR _FirstValue =
    CALCULATE ( MAXX ( VALUES ( 'Date'[Date] ), [Measure] ), ALL ( 'Table' ) )
VAR _LastValue =
    CALCULATE ( MINX ( VALUES ( 'Date'[Date] ), [Measure] ), ALL ( 'Table' ) )
VAR _dayDiff =
    CALCULATE ( DATEDIFF ( MIN ( 'Date'[Date] ), TODAY (), DAY ), ALL ( 'Table' ) )
VAR _valueDiffBefore = _LastValue - _FirstValue
VAR _decrementalValue =
    DIVIDE ( _valueDiffBefore, _dayDiff )
VAR _daysFeature =
    DIVIDE ( _LastValue, - _decrementalValue )
VAR _endDate =
    TODAY () + _daysFeature
VAR _dayDiffAfter =
    DATEDIFF ( TODAY (), SELECTEDVALUE ( 'Date'[Date] ), DAY )
VAR _dayAddDecrementalValue =
    IF (
        _dayDiffAfter > 0
            && _dayDiffAfter <= _endDate,
        _LastValue + _dayDiffAfter * _decrementalValue
    )
RETURN
    SWITCH (
        TRUE (),
        SELECTEDVALUE ( 'Date'[Date] ) <= TODAY (), SELECTEDVALUE ( 'Table'[Value] ),
        _dayAddDecrementalValue
    )

 

Best Regards,
Yang

Community Support Team

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors