Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I would like to add analysis to below expression,
Sum(SALES_QUANT*SALES_COST)
Is it possible to sum with multiple fields with analysis? like below example,
Sum(({$<[Field A] = {">0"}, [Field B] = "123">}SALES_QUANT)*({$<[Field C] = {">10"}, [Field D] = "456">}SALES_COST))
Best Regards,
Louis
Hi Louise,
It's not possible to use your expression.
The best way is you create sales_quantity and sales_cost condition field on data load editor.
example :
if( FieldA >0,
if( FieldB = 123, Sales_quantity)) as Sales_quantity,
if( FieldC >10,
if( FieldD = 456, Sales_cost)) as Sales_cost,
then in your expression you can use sum(sales_quantity*sales_cost)
or if you want to put condition in your expression, you can use this script.
sum(
if( FieldA >0,
if( FieldB = 123, Sales_quantity))*
if( FieldC >10,
if( FieldD = 456, Sales_cost))
)
Regards,
Marco
Why not just this:
Sum({$<[Field A] = {">0"}, [Field B] = {123}>}SALES_QUANT*SALES_COST)
Try like:
Sum({$<[Field A] = {">0"}, [Field B] = {'123'}>}SALES_QUANT) * Sum({$<[Field C] = {">10"}, [Field D] = {'456'}>}SALES_COST)