0

looking for a little help with calculating a value from XML data in a BI Publisher template.

I'm trying to say "If percentage column isn't null, then Sum up the cost column and multiply by 1 + percentage column/100"

I thought it would be this :

<?if:(LABOR_MARKUP_PERCENTAGE)?><?sum(BURDENED_COST)*(1+(LABOR_MARKUP_PERCENTAGE div 100))?><?end if?>

But that doesn't work, I get a weird value.

If I output sum(BURDENED_COST) in my template I get 1094396.49

If I output (1+(LABOR_MARKUP_PERCENTAGE div 100) in my template I get 1.075

So for this column I'm here about, I'm expecting to get 1094396.49 * 1.075 = 1176476.22675 as my column output, but instead I get **1.2846451454999999E6 **

I'm guessing there's something else I have to do - does anyone have any ideas?

Grateful for any advice.

Thanks

Tried : <?if:(LABOR_MARKUP_PERCENTAGE)?><?sum(BURDENED_COST)*(1+(LABOR_MARKUP_PERCENTAGE div 100))?><?end if?>

Expected 1176476.22675

Got 1.2846451454999999E6

1 Answers1

0

Just needed to format the field itself to a number in the template.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 31 '22 at 11:40