Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am Michele and I have a big problem with an expression. in a pivot table
I attached a sample file... the problem is with an expression in a pivot table....I have a sample list of products with their agent, import and net weight. I created a pivot table with expressions like total of imports,(amounts) total of net weight and a column defined as average of imports/net weights. The problem is to display an other column total of imports where the sum is the result of only the rows that have import/net weight less than the half of average colum calculate before.
I coloured in Yellow the column with wrong expression.
thank you for advance
Michele
if(
sum(import)/sum([net weight]) <
avg( TOTAL
aggr(sum(import)/sum([net weight]), Agent,Product,Calibre)
)
/2,
sum(import)/sum([net weight])
)
Maybe like
=sum(
Aggr(
if(import/[net weight]<(sum(TOTAL<Agent,Product,Calibre>import)/sum(TOTAL<Agent,Product,Calibre>[net weight])/2),import,0),
Agent,Product,Calibre,ID
))
But I haven't found any IDs for which your condition is fulfilled.