The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a measure for Forecasted_at_completion within my datamodel. I noticed that the figures were right in the columns of my Matrix visualisation but when I looked at the totals they were incorrect. When I use the sum function within my 'FORECASTEDTOCOMPLETIONWEIGHT' measure i get the correct value (0 in the example below), but when i use SUMX in 'TotalFORECASTEDTOCOMPLETIONWEIGHT' it returns 15.40. I've tried debugging with chatgpt but no joy. Please help. My Forecasted_at_completion in the below should show 49.21
Solved! Go to Solution.
@jpdamd90 here is the solution, try with this updated formula in Remaining Supply:
@jpdamd90 The code for this rule is:
The totals just don't seem to work correctly at all, see below for Jumpform. Total should be $1,695,659 based on the numbers within that element but it shows as $1,348,848 which is the total of SumbudgetSupplyCost & SumBudgetInsallCost 😕
Hey, thanks for replying. When you say sample data do you mean the background tables or the details of the measures that are making up the above formulas?
The issue is happening on a Distinct table i created. Code below. No matter what I try I cant seem to get the totals for any remaining value calculations working. See additional screenshots with highlighted issues. Hilighted in yellow adds up to over 286 where the total is showing as 192.88.
@jpdamd90 the dataset. Can you share the pbix file? or paste some sample data, so that i can recreate your scenario.
BBF
See link below to onedrive with trimmed down pbix. Apologies in advance for the state of the data model, building it adhoc with not much knowledge or time.PIBX File
@jpdamd90 here is the solution, try with this updated formula in Remaining Supply:
Legend mate thank you so much. Is there anyway you could help me with my Forecasted at completion, it doesnt seem to be calculating correctly either.
See example below under my accessories element. B1 has a actually supply of $57073 & a budgeted install of $9104 so the forecasted at completion should be 66,177 but it shows as $57073.
Then L4 has a supply budget of $9801, an install budget of $18431 which should give a total of $28,232 but it is displaying $31,577.
And a potentially more complex issue I'm having is figuring out a way to use previous overrun from completed elements to update the forecasted at completion for uncompleted elements. EG- if JUMPFORM for levels B3, B2 & B1 is completed and has finished with an actual supply and install tonnage and cost that is on average 10% higher than Budgeted, then the forecasted at completion would use the budget for levels GF and up with a 10% additional for working out the forecasted at completion.
Really appreicate your time and help!
@jpdamd90 please accept the first answer as a solution. As soon as I can I'll try to look at the other points you wrote to me and let's do some tests!
BBF
Brilliant bud thanks so much
@jpdamd90 So, first point, the forecasted, It appears you are not getting the correct fields for the operation you describe. In fact, taking the fields you indicated, the correct result is 66,176:
If it's ok, accept the solution and i'll pass to the next topic.
BBF
Thanks BBF, It still doesn't seem to be returning the correct value for the other levels further down the list. It looks to only return the budget Install Cost not the combined budget install and budget supply?
@jpdamd90 because i did [SumTotalInvoice] + [SumBudgetINSTALLCOST], that is SUPPLY ($) + BUDGET INSTALL ($), so try with this updated:
Still some issues when I look at the other elements mate sorry. See below. Your total shows as $110,866 where the calc should be Actual Supply $ 62735 + actual install $ 70776 + sch cost $27338 + Remaining install (3.64 * 1200 = $4368) = $165,217 😞
@jpdamd90 i need you to explain the rule, when this field must do a calculation, when another, ecc...
BBF
Sorry I didn't explain the logic behind it very well. So its trying to get a forecasted at completion cost for the level/element.
If Supply Budget and Install Budget are higher than actual supply, actual install and sch forecast then the forecasted at completion would just be the budgets combined.
If the supply/install/sch combined are already higher than the budget, the element has gone over budget and the forecasted at completion will be the Total of Supply $ + Install $ + Sch $ + Supply remaining (T) * 1800 + Install Remaining * 1200
IIf possible then for completed elements (Ones that have YES in the Complete column. Calculate the average variance from the budget and have this applied to the same element budget for later levels. That way the forecasted at completion would be
If the Budget supply + the budget install + the Average % overrun from previous levels for that element is greater than the actual supply + install + sch cost then it would display as the budget with that % added on.
Hope this makes sense. thanks again
@jpdamd90 i can't undestand you in this way, you need to explain to me by using field names. For example:
If [SumTotalInvoice] is blank, make
Apologies, see below with fields included.
If Supply Budget [sumbudgetsupplycost] and Install Budget [sumbudgetinstallcost] are higher than actual supply [SumTotalInvoice], actual install [SumClaimCost] and sch forecast [Scheduled Cost] then the forecasted at completion would just be the budgets combined ([SumBudgetsupplycost] + [SumbudgetInstallCost]).
If the actual supply [SumTotalInvoice], actual install [SumClaimCost] and sch forecast [Scheduled Cost] combined are already higher than the budget ([SumBudgetsupplycost] + [SumbudgetInstallCost]), the element has gone over budget and the forecasted at completion will be the [SumTotalInvoice], actual install [SumClaimCost] and sch forecast [Scheduled Cost] + Supply remaining (T)[Remaining Supply] * 1800 + Install Remaining[Remaining Install] * 1200
@jpdamd90 The code for this rule is:
Think I'm getting closer to gettin the totals resolved. I've used the below measures which I found from the youtube video linked. I now have the SubTotal for each measure showing correctly but can figure out away to get the Grand Total to calculate correctly. Any ideas?
https://www.youtube.com/watch?v=dgwsk2fjWLc
Finally got it resolved using the below
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |