Forum Discussion

JackEnviro's avatar
JackEnviro
Helper I
7 years ago

Infinity issue with DIVIDE multiply and subtract #2

Hi all 

 

I have the following formula which works but with an infinity issue. I have been trying to re-work using devide but cannot get the right result.

 

Sales Total (Net) = SUMX('Invoices',('Invoices'[LineItem_UnitAmount]*'Invoices'[LineItem_Quantity] - 'Invoices'[CreditAmount] )/Invoices[LineItem_TaxAmount])

 

The underlying data table for s ingle order/invoice is below

 

Any suggestions would be most appreciated.

 

Thanks 

Jack 

 

 

LineItem_QuantityLineItem_UnitAmountLineItem_ItemCodeLineItem_TaxAmountLineItem_LineAmountInvoiceNumberSubTotalTotalTaxTotalAmountPaidAmountCreditedTax%CreditAmount            
4627.36D-H-S-4209.761258.56EB132691957.34392.052349.392349.3901.20            
1812.39DA-SP-1072.4432.59EB132691957.34392.052349.392349.3901.20            
520.99DA-TC-B17.5104.95EB132691957.34392.052349.392349.3901.20            
3518.57DA-J-P-50108.5649.95EB132691957.34392.052349.392349.3901.20            
1-123.65 -20.61-123.65EB132691957.34392.052349.392349.3901.20            
126.99DA-LC-B4.526.99EB132691957.34392.052349.392349.3901.2

 

 

 

1 Reply

  • v-eachen-msft's avatar
    v-eachen-msft
    Community Support

    Hi JackEnviro ,

     

    I tried your dax but nothing wrong appeared. Maybe your sample table is normal. When I randomly change a value to a null value in column “LineItem_TaxAmount”, your problem will occur. So You can check if this column contains null values. By the way, you can try to use DIVIDE() instead of divisor.

     

    Best Regards,

    Eads

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.