Sales Tax Issue
I looked through the forum and I was unable to find an answer that works for me. In Pennsylvania, sales tax is only collected on select items. I'm trying to create a formula that returns the sales tax on taxable items. I used a yes/no field in each line item on the invoice to show which items are taxable and which are not. I can't come up with a formula that will allow me to calculate the sales tax based on the items where sales tax = true.
I found this formula in the forum but I can't get it to work with a choice field.
sum('Invoice Items'[Article.VAT = 1].Total) * 0.06
The other challenge I'm running into is that I need to sometimes apply a discount that reduces the total before tax which in turn reduces the tax on an invoice. The discount is global and applies to all line items on the invoice.
3 replies
-
I looked through the forum and I was unable to find an answer that works for me. In Pennsylvania, sales tax is only collected on select items. I'm trying to create a formula that returns the sales tax on taxable items. I used a yes/no field in each line item on the invoice to show which items are taxable and which are not. I can't come up with a formula that will allow me to calculate the sales tax based on the items where sales tax = true.
I found this formula in the forum but I can't get it to work with a choice field.
sum('Invoice Items'[Article.VAT = 1].Total) * 0.06
The other challenge I'm running into is that I need to sometimes apply a discount that reduces the total before tax which in turn reduces the tax on an invoice. The discount is global and applies to all line items on the invoice.
-
I guess it didn't save my whole post.... sorry for the double post.
I have three tables. The vendor is the parent table. Invoices which is a child table to vendor. And Purchased Items which is a child table to vendor was well.
I'm using the following fields.
'Purchase Item Total' which sums the purchases from the Purchased Items Table.
'Items SubTotal' (Invoice Table)
'Shipping & Handling' (Invoice Table)
'Coupon/Discount' (Invoice Table
'Total before tax' (Invoice Table)
'Tax' (Invoice Table)
'Grand Total' (Invoice Table)
The shipping and handling costs aren't taxable.
The coupon field reduces the total which reduces the taxes collected. This applies to the global order.
I have two situations going on. I need to be able use a yes/no field to designate if tax is applicable to the item. I then have to reduce the total before taxes by the discount amount.
For example
Item A cost $14.49 (tax @ 0.06 or 6%)
Item B cost $25.99 (tax) (discount of $1.30 applied to this item)
Item C cost $16.95 (no tax)
Item D cost $14.95 (tax)
Item(s) Subtotal: 72.38
Shipping & Handling 0.00
Coupon -$1.30
Total Before Tax $71.08
Tax $3.25
Grand Total $74.33
-
In a formula on a field in your Invoice Table you can do something like:
let curRec := this;
let xTax := (select 'Purchased Items' where Invoices = curRec and 'sales tax' = 1); <- make sure that Invoices is the exact name of the reference field in your Purchased Items table
sum(xTax.'Purchased Items Total')I think I got all your table and fields correct. Just double check them.
If this works then we can move on from there.
Content aside
- 3 yrs agoLast active
- 3Replies
- 376Views