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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
hongyuliu
Helper III
Helper III

To compare rolling forecast of current and previous month.

Hello,

I want to compare rolling forecast of January and Febuary for each product and company. I need a new column, raw data and result should be like following:

 

Capture.PNG

 

Can you please instruct how to write the formula?

 

Thank you

1 ACCEPTED SOLUTION
v-nuoc-msft
Community Support
Community Support

Hi @hongyuliu 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

 

vnuocmsft_0-1711421757291.png

 

Create a column.

 

New Column (Previous Forecast) = 
IF('Table'[Date of Update] <> MIN('Table'[Date of Update]),
CALCULATE(
    VALUES('Table'[Value]), 
    FILTER(
        ALL('Table'), 
        'Table'[Product] = EARLIER('Table'[Product]) 
        && 
        'Table'[Forecast Month] = EARLIER('Table'[Forecast Month]) 
        && 
        'Table'[Date of Update] = MIN('Table'[Date of Update])
    )
),
BLANK()
)

 

 Here is the result.

 

vnuocmsft_1-1711421812215.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-nuoc-msft
Community Support
Community Support

Hi @hongyuliu 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

 

vnuocmsft_0-1711421757291.png

 

Create a column.

 

New Column (Previous Forecast) = 
IF('Table'[Date of Update] <> MIN('Table'[Date of Update]),
CALCULATE(
    VALUES('Table'[Value]), 
    FILTER(
        ALL('Table'), 
        'Table'[Product] = EARLIER('Table'[Product]) 
        && 
        'Table'[Forecast Month] = EARLIER('Table'[Forecast Month]) 
        && 
        'Table'[Date of Update] = MIN('Table'[Date of Update])
    )
),
BLANK()
)

 

 Here is the result.

 

vnuocmsft_1-1711421812215.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hongyuliu
Helper III
Helper III

Hello,

I want to compare rolling forecast of January and Febuary for each product and company. I need a new column, raw data and result should be like following:

 

Capture.PNG

 

Can you please instruct how to write the formula?

 

Thank you

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.