Sum values from two different siblings in BI Publisher XML
Hi,
In this xml structure I need to sum values between elements. Specifically, I need to sum PartsTotal_ID11 for all elements and when PartsTotal does not exist (i.e. DocumentType_ID19 = 'JA'), I need to use AmountField_ID23 in its place.
So, in this example, the total should include the values: 7.87 + 23.93 + 398.36, but the value 7.87 is not being added to the grand total, as can be seen in the following image. the total 537.47 is from the values 115.18+422.29.
The values for Doc Types T2 and IM are from the field PartsTotal_ID11.
The value for Doc Type JA is from the field AmountField_ID23.