cancel
Showing results for
Did you mean:
Frequent Visitor

## Calculate Forecast with Cumulative Totals and Circular Dependency

Hi Experts,

I am trying to forecast with very few data points. So I need to go the Cumulative Totals way, the way we do in excel.

Created a sample for you below:

 Month Actual Sales Cumulative Sales Days in Month Cumulative Days in Month Forecast Sales Explanation Result Column Jan 2019 120 120 31 31 120 120 Feb 2019 97 217 28 59 217 217 Mar 2019 135 352 31 90 352 352 Apr 2019 82 434 30 120 434 434 May 2019 434 31 151 (434/120)*151 IF Col 'B' Isblank then Max(Cumulative Sales)/Cumulative Days of Last Non Blank Actual Total Month * Cumulative Days of Current Blank Month 546.1 Jun 2019 434 30 181 (434/120)*181 654.6
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support

## Re: Calculate Forecast with Cumulative Totals and Circular Dependency

Hi @cmgovind ,

I created a calculated column to implement it that you can reference.

```Forecast Sales =
var max_days = CALCULATE(MAX('Table'[Cumulative Days in Month]),FILTER('Table','Table'[Actual Sales]<>BLANK()))
return
IF('Table'[Actual Sales] = BLANK(),DIVIDE(MAX('Table'[Cumulative Sales]),max_days) * 'Table'[Cumulative Days in Month],'Table'[Cumulative Sales])```

Best Regards,

Xue Ding

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

2 REPLIES 2
Community Support

## Re: Calculate Forecast with Cumulative Totals and Circular Dependency

Hi @cmgovind ,

I created a calculated column to implement it that you can reference.

```Forecast Sales =
var max_days = CALCULATE(MAX('Table'[Cumulative Days in Month]),FILTER('Table','Table'[Actual Sales]<>BLANK()))
return
IF('Table'[Actual Sales] = BLANK(),DIVIDE(MAX('Table'[Cumulative Sales]),max_days) * 'Table'[Cumulative Days in Month],'Table'[Cumulative Sales])```

Best Regards,

Xue Ding

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

Frequent Visitor

## Re: Calculate Forecast with Cumulative Totals and Circular Dependency

This works great. Thanks for your help 🙂

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

#### Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

#### Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors