Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have an set expression
if([Prod. Hr. Level 2]='Aircooled Screw Local Factory',(sum(Cost1)/Sum (Quantity1))*0.86,
if([Prod. Hr. Level 2]='Watercooled Screw Local Factory',(sum(Cost1)/Sum (Quantity1))*0.90 ,
(sum(Cost1)/Sum (Quantity1)))) which I used in front end but my requirement is same set expression I need to use in backend with column name as perunitcost1.
Is this possible,if yes then help me out in this.
HI
If all are comes under same table, then try like below.
Hope, its line item level.. I.e. all line items has cost1 and quantity level info.. if not, then u need to use sum() in the back end also. its depends on ur data.
Load *,
if([Prod. Hr. Level 2]='Aircooled Screw Local Factory',(Cost1/Quantity1)*0.86,
if([Prod. Hr. Level 2]='Watercooled Screw Local Factory',(Cost1/Quantity1)*0.90 ,
(Cost1/Quantity1))) from urdatasource;
If its from different tables, then need to change the data model to bring all in one table with primary key.
So that, you can follow above steps.