Power Query : Add a custom column to get YTD value and Custom column to have Forecast value

hananak

Board Regular
Joined
Feb 10, 2022
Messages
110
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Dear All,

I would really appreciate your help.

I have a file; the data is imported via connection only in Power Query. I have many columns but most importantly the monthly columns. I want to have a custom column for YTD, which will sum up all these columns. Then I want to have another YTD column where it will divide the YTD value by the no of months I have and multiply by 12.

So, suppose we have two months data (April and May).

April = £1,000
May - £3,000

I want a custom column for YTD and the result should be = £4,000
Another custom column for Forcast and the result should be = (£4,000/2) x 12 = £24,000

and when I have in the next month 3 months data (April, May and June)

It should sum up all three months, and for the forecast, it should divide by 3 and multiply by 12 automatically.

Your help would be really appreciated.
 
@jdellasala, I'm smiling. Don't ask me why 😉
Seems we have a different reading on the need. My take: the division by 2 is only because there are numbers filled out for the first two months and the year starts in April. For me the calendar used here is a fiscal year that's a quarter behind.
Glad you're smiling!
You have a good point, but what we both need is a clearer picture of what @hananak needs! I suppose that if the formula given is actually an AVERAGE and not a SUM, it would make more sense, but then dividing by 12 shouldn't be needed.
We'll have to wait and see what if any response we get!
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I believe it's rather clear, no? See below in the quote. That's exactly what I do each month for a lineair forecast. It's a sum, not an average. It's a widespread approach to estimate a year end value. I stopped telling people they can use forecasting function btw.
and when I have in the next month 3 months data (April, May and June)

It should sum up all three months, and for the forecast, it should divide by 3 and multiply by 12 automatically.

Your help would be really appreciated.
 
Upvote 0
I believe it's rather clear, no? See below in the quote. That's exactly what I do each month for a lineair forecast. It's a sum, not an average. It's a widespread approach to estimate a year end value. I stopped telling people they can use forecasting function btw.
Yeah, see that now. But my M code skill just doesn't cut it!
 
Upvote 0

Forum statistics

Threads
1,223,959
Messages
6,175,645
Members
452,663
Latest member
MEMEH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top