Forum Discussion
Dealing with Measure Totals
Please I am experiencing the same issue
My objective is to calculate the total budget associated with each Workorder status however for Projected Workorders, the budget for Open and Initiated should be netted off till it gets to 0. Meaning the Budget measure would need to incorporate an adjustment for Projected Workorders
I have been able to do this successfully but the grand total does not work.
For the grand total, I am still getting a sum that reflect the original not adjusted projected budget regardless of the logic built into the measure
Below is my measure. When I use ‘HASONEVALUE’ I get 0 as the grand total
Please help
Budget =
VAR WOstatus =
FIRSTNONBLANK ( 'Projected WO'[WO_Status], 1 )
VAR BudgetTotal =
CALCULATE (
SUM ( Budget[Amount] ),
FILTER ( Budget, Budget[BudgetType] = "Budget" )
)
VAR ProjectedAmount =
CALCULATE (
BudgetTotal,
'Projected WO'[WO_Status] IN { "Projected", "projected" }
)
VAR InitiatedAmount =
CALCULATE (
BudgetTotal,
'Projected WO'[WO_Status] IN { "Initiated", "initiated" }
)
VAR OpenAmount =
CALCULATE (
BudgetTotal,
'Projected WO'[WO_Status] IN { "open", "Open" }
)
VAR AdjustedProjectedAmount = MAX( (ProjectedAmount - InitiatedAmount - OpenAmount ), 0)
RETURN
IF (
NOT ( WOstatus IN { "Projected", "projected" } ),
BudgetTotal,
AdjustedProjectedAmount)
- Ashish_Mathur2 years ago
Super User
Hi,
Share data in a format that can be pasted in an MS Excel file. Explain the question and show the expected result.