Hi,
Please check the data type of the properties "Item Price" and "Item Quantity". If $Orderinfo is imported from a file, the data type of the properties should be string and have to be cast to float or double. See if this works
For ($i=0; $i -lt $OrderInfo.count; $i++)
{
$totalprice = $totalprice + [float]$Orderinfo[$i]."Item Price" * [float]$Orderinfo[$i]."Item Quantity"
}
Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.