=IIf((Sum([PMCostBudget.CuryAmount]-[PMCostBudget.CuryActualAmount])<0),'green0')
Above expression is not working. This field is a calculated field to find the variance.

=IIf((Sum([PMCostBudget.CuryAmount]-[PMCostBudget.CuryActualAmount])<0),'green0')
Above expression is not working. This field is a calculated field to find the variance.
Hi,
I attached an example.
To make it work, here are some tips.
In addition to, I see that the IIF function in your example is not complete. There are 3 segments split by commas =IIF(CONDITION,TRUE,FALSE). When the conditions are met, the TRUE segment will be displayed. Otherwise, the FALSE segment will be displayed.
=IIf((([PMCostBudget.CuryAmount]-[PMCostBudget.CuryActualAmount])<0),'green0','red0')
Thanks this helps.
I have a similar setup that i cant get to work, would love your thoughts as to whats wrong
=IIf(iif(year((ARInvoice.CreatedDateTime])=2020, ARInvoice.CuryOrigDocAmt], 0)-iif(year((ARInvoice.CreatedDateTime])=2019, ARInvoice.CuryOrigDocAmt], 0)>0, 'good', 'bad')
I actually want the SUM of fARInvoice.CuryOrigDocAmt] for each one. In its current format it just seems to take the first sARInvoice.CuryOrigDocAmt]. How should this be written?
The overall requirement of the generic enquiry is one, calculate the ales per year for a customer, (this section is working fine) and then two, colour the box depending on whether the customer has brought more or less than the year before.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.