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
Santisda
Regular Visitor

Moving Target Sum

Hi community. Im trying to replicate an excel calculation from a colleague. Basically he created this measure that aims to predict revenue stream for upcoming months. I do not agree with this method but my only task is replicating this in Bi. I will explain everything below as I feel it's easier shown than written.

 

Basically I have data in the way thats shown below:

 

TABLE AABC
1YearMonthRevenue
220211100
320212102
420213101
520214122
620215100
720216123
820217100
920218105
1020219130
11202110115
12202111115
13202112162
1420211123
1520212121
1620213100

 

I need to create a measure that calculates a new column, lets call it D, that will have information sort of like this:

 

TABLE AABCD
1YearMonthRevenueNew Measure
220211100+SUM(C3:C14)
320212102

+SUM(C4:C15)

420213101+SUM(C5:C16)
520214122...
620215100 
720216123 
820217100 
920218105 
1020219130 
11202110115 
12202111115 
13202112162 
1420211123 
1520212121 
1620213100 



Any ideas on hwo to calculate this new measure in PBi?

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @Santisda 

May I ask if this is the expected output you are looking for? Based on your description, I have created a measure to achieve the effect you are looking for. Following picture shows the effect of the display.

vyaningymsft_0-1705473041229.png

Measures:

PredictedValue =

VAR _1 =

    SUM ( 'Table'[Index] ) + 1

VAR _2 =

    SUM ( 'Table'[Index] ) + 12

VAR _predictedValue =

    CALCULATE (

        SUM ( 'Table'[Revenue] ),

        FILTER ( ALL ( 'Table' ), 'Table'[Index] = _1 || 'Table'[Index] = _2 )

    )

RETURN

    _predictedValue

If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community

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

2 REPLIES 2
Anonymous
Not applicable

Hi, @Santisda 

May I ask if this is the expected output you are looking for? Based on your description, I have created a measure to achieve the effect you are looking for. Following picture shows the effect of the display.

vyaningymsft_0-1705473041229.png

Measures:

PredictedValue =

VAR _1 =

    SUM ( 'Table'[Index] ) + 1

VAR _2 =

    SUM ( 'Table'[Index] ) + 12

VAR _predictedValue =

    CALCULATE (

        SUM ( 'Table'[Revenue] ),

        FILTER ( ALL ( 'Table' ), 'Table'[Index] = _1 || 'Table'[Index] = _2 )

    )

RETURN

    _predictedValue

If this does not work, could you please share some sample data without sensitive information and expected output.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community

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

Hi!

 

tThanks for your reply. actually is not exactly what I need, but you just gave me the perfect idea of how I might solve it! So thanks a lot! Ill mark you up as solution anyways. 

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.