Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Chandu
Contributor II
Contributor II

How to use Set analysis syntax in backend

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.

Labels (1)
1 Reply
MayilVahanan

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.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.