Expressions wrapped in parenthesis

Having trouble producing a result, I know it's where the parenthesis are placed in the expression.

"<<(SUM(SELECT(Ticksheet[RR], [JobID] = [_THISROW].[JobID]))+
SUM(SELECT(Ticksheet[REP],[JobID] = [_THISROW].[JobID]))+
SUM(SELECT(Ticksheet[PAI],[JobID] = [_THISROW].[JobID])))*
(SUM(SELECT(MobileEstimateCustomers[Labour Rate],[JobID]=[_THISROW].[JobID])))+


SUM(SELECT(MobileEstimateCustomers[Other Total],[JobID]=[_THISROW].[JobID]))+
SUM(SELECT(MobileEstimateCustomers[SubTotal],[JobID]=[_THISROW].[JobID]))>>"

The expression with the following image should produce 1625 in the Sub Total not 2500.00. The [Labour Rate] is 50 and the first part of the expression returns correct as 27 * 50 = 1350

DaveWillett_0-1649093950146.png

 

Parts, Materials and Other Total = 275, again this is correct. So 1350+275 should return 1625 but as you can see it returns 2500, I'm putting it down to parenthisis placement in the 2nd part of the expression.

(forget VAT and Total to Pay, I haven't got that far yet)

Can anyone assist?

Cheers

 

 

0 7 212
7 REPLIES 7
Top Labels in this Space