Forum Discussion
Sum of elements
HASONEFILTER(switch(TRUE(),[Consumption Qty]<[Allocation -10%],[Allocation -10%]-[Consumption Qty],[Consumption Qty]>[Allocation +10%],[Allocation-Consumption]+[Allocation]*.10,0))*[Net Price])
Nope. Still asks me for a column.
The original formula is a composite of measures built from columns in multiple tables.
I need the total to be in terms of product. Add line 1, 2, 3, etc. just like I could do in excel.
Is there an option for "aggregate by product" or something?
- Greg_Deckler9 years agoCommunity Champion
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.
- dniedrauer9 years agoResolver I
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]