Forum Discussion
Sum of elements
You need to post sample/mock data. What I am referring to is to is to have a table in which you have Product.
IF(HASONEFILTER([Product]), calculate one way, calculate another way)
It sounds like the issue is that your table is correct except for the totals.
Allocation Table
[vessel]
[chemical]
[allocation]
allocation bridge (combinding items from allocation and main tables)
[vessel]
[chemical]
[allocation]
main table
[vessel]
[chemical]
[consumption]
[date]
Allocation measure = sum('allocation bridge'[allocation])
consumption qty measure = sumx('main',[qty]*[xqty])
Refund/Charge = (switch(TRUE(),[Consumption Qty]<[Allocation -10%],[Allocation -10%]-[Consumption Qty],[Consumption Qty]>[Allocation +10%],[Allocation-Consumption]+[Allocation]*.10,0))*[Net Price]