Forum Discussion
Revenue Recognition Calculation Issue
Hi,
I think the issue is here.. You have stored the Percentages in a table and then use a measure Perc to sum this up. The problem is that the Percentage is a measure in my situation =cost of the month divided by the sum of that month and future forecasted costs. This is dynamic as the forecasts could change and so would this percentage. I have a measure defined for the above and this is working fine. Now this % has to be multiplied by 139000 (less sum of revenue calculated for earlier months). Since the Cost percent is a measure and not stored in a table, i was wondering how to sum this as you have done using your perc measure. That i think is one of the issues
For Oct the calculation is as such:
Cost of October (Since it is a past month, this cost is actual) divided by the total cost (Total Cost measure takes the actual cost of any month and adds this to the forecasted cost of all future months). Formula is Cost for the month divided by total cost
Your sample data does not include a cost column.
- RajeshPBI2 years agoFrequent Visitor
The sample data has a cost percentage which is a measure and calculates the percentage as below.
What is do is the following:
One measure called Actual Cost: This measure looks at the time entered by each employee in the time entry table and then looks at the blended cost rate of each employee and calculates the actual cost for the month.
One measure called Forecasted Cost: This looks at the forecast table (Where time is forecasted by Employee per period). Sums the time after the max date of actual time (That way it only looks at cost for the future) and then looks at the blended cost rate of each employee and calculates the forecasted cost for the remaining portion of the project duration.
One measure called Total Cost: This adds the above two measures Actual cost for the period and the forecasted cost for the future periods to get the total remaining cost as on the period (Does not look at past cost)
Then finally i derived the Cost Percent Measure where the Actual cost for the period is divided by the Total Cost. This percentage is what i have shown in the sample data in the Cost Percent Column.The above measures are working fine.
Why are these measures and i didnt try calculated columns? Reason is forecast data changes every month and hence the %'s for cost in the future periods also keep changing. What has happened in the past is based on actuals and these dont change. That is why forecasted cost is calculated only after the Max of the time entry date in the time entry table.
- lbendlin2 years agoSuper User
I hope someone else can help you further.
- RajeshPBI2 years agoFrequent Visitor
Hi,
Made Some progress but got stuck in the below point.
Original Fixed Fee Amount was $139,000. First year revenue recognized was $11,344 and the Net Fixed Fee Amount available for further allocation of revenue was $139,000 less $11,344 which is $127,656.
In DAX – my understanging is that VAR is a constant and we cannot change the value of the variable inside the code. Hence I stored the above $127,656 in a variable BUDGETAMOUNTLESSYEAR1 and that is showing properly in the output.
I wanted to use this as an input for calculation of revenue for the second period and I am calling BUDGETAMOUNTLESSYEAR1 in another variable inside an IF clause which checks for Period 2. This variable is called PeriodTwoBudget. Ideally it should be the same $127,656. However, it is showing $121,814.
Don’t understand how this number changed from $127,656 which was the value in the original variable to $121,814. No other filters in the visual other than project number.
Actual Cost % To Forecast is a measure as i had explained earlier, to calculate the cost % and that is working as expected.
Can you look at this and maybe identify what is affecting the number?
RR Period Measures =
VAR StartDate=FORMAT(MIN('Project Master'[Start Date]),"MMM YYYY") -- Jun 2023
VAR SelectedPeriod=MIN('MS Calendar'[Month Year]) -- Respective Periods
VAR BUDGETAMOUNT = sum('Project Master'[Fixed Fee/Cap]) -- $139,000
VAR PeriodOne = [Actual Cost % To Forecast]*BUDGETAMOUNT -- $11,344 (8.16% * 139000)
VAR BUDGETAMOUNTLESSYEAR1=(BUDGETAMOUNT-PeriodOne) -- $127,656 ($139,000 - $11,344)
Return
IF(SelectedPeriod=StartDate,BUDGETAMOUNTLESSYEAR1,
VAR PeriodTwo=FORMAT(EDATE(DATEVALUE("1 " & StartDate),1),"MMM YYYY")
VAR PeriodTwoBudget=BUDGETAMOUNTLESSYEAR1 -- $121,814 (this is where the problem is. Should be $127,656)
VAR PeriodTwoRR = [Actual Cost % To Forecast]*PeriodTwoBudget -- 12.36% * $121,814
return
IF(SelectedPeriod=PeriodTwo,PeriodTwoBudget))