Forum Discussion
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_Quantity | LineItem_UnitAmount | LineItem_ItemCode | LineItem_TaxAmount | LineItem_LineAmount | InvoiceNumber | SubTotal | TotalTax | Total | AmountPaid | AmountCredited | Tax% | CreditAmount | ||||||||||||
| 46 | 27.36 | D-H-S-4 | 209.76 | 1258.56 | EB13269 | 1957.34 | 392.05 | 2349.39 | 2349.39 | 0 | 1.2 | 0 | ||||||||||||
| 181 | 2.39 | DA-SP-10 | 72.4 | 432.59 | EB13269 | 1957.34 | 392.05 | 2349.39 | 2349.39 | 0 | 1.2 | 0 | ||||||||||||
| 5 | 20.99 | DA-TC-B | 17.5 | 104.95 | EB13269 | 1957.34 | 392.05 | 2349.39 | 2349.39 | 0 | 1.2 | 0 | ||||||||||||
| 35 | 18.57 | DA-J-P-50 | 108.5 | 649.95 | EB13269 | 1957.34 | 392.05 | 2349.39 | 2349.39 | 0 | 1.2 | 0 | ||||||||||||
| 1 | -123.65 | -20.61 | -123.65 | EB13269 | 1957.34 | 392.05 | 2349.39 | 2349.39 | 0 | 1.2 | 0 | |||||||||||||
| 1 | 26.99 | DA-LC-B | 4.5 | 26.99 | EB13269 | 1957.34 | 392.05 | 2349.39 | 2349.39 | 0 | 1.2 |
1 Reply
- v-eachen-msftCommunity 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.