Forum Discussion
Sergun70
8 years agoFrequent Visitor
Allocate rest ammount
I have allocated planned budged over time proportionally up to end date and i have fact column and know i don't know how to allocate differenece of planned budget and actua from last transactionl up to end date. Help will be very appreciated!
4 Replies
- Sergun70Frequent Visitor
My data looks like this: Project budget: 12000 Budget equally allocated Actual Jan 1000 900 Feb 1000 900 Mar 1000 900 Apr 1000 900 May 1000 900 Jun 1000 900 Jul 1000 900 Aug 1000 Sep 1000 Oct 1000 Nov 1000 Dec 1000 Total 12000 6300 Desired result: Month Budget allocated Actual Jan 1000 900 Feb 1000 900 Mar 1000 900 Apr 1000 900 May 1000 900 Jun 1000 900 Jul 1000 900 Aug 1000 1140 Sep 1000 1140 Oct 1000 1140 Nov 1000 1140 Dec 1000 1140 Total 12000 12000 - v-yulgu-msft
Microsoft Employee
Hi Sergun70,
If the [Month] column in dataset is sorted in correct order (Jan, Feb, Mar, Apr etc), please add an index column in Query Editor mode.
If the [Month] column is sorted in irregular order, (like, Jan, Mar, Nov, etc), please add a conditional column in Query Editor to list MonthNo for each Month name.
Then, in report view, create calculated column.
Actual 2 = IF ( 'Project budget'[Index] > MONTH ( TODAY () ), ( CALCULATE ( SUM ( 'Project budget'[Budget equally allocated] ), ALL ( 'Project budget' ) ) - CALCULATE ( SUM ( 'Project budget'[Actual] ), FILTER ( 'Project budget', 'Project budget'[Index] <= MONTH ( TODAY () ) ) ) ) / ( 12 - MONTH ( TODAY () ) ), 'Project budget'[Actual] )To get your desired output, you can create a calculated table as well.
Result Table = SELECTCOLUMNS ( 'Project budget', "Month", 'Project budget'[Month], "Budget allocated", 'Project budget'[Budget equally allocated], "Actual", 'Project budget'[Actual 2] )Best regards,
Yuliana Gu