Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have one requierment that i need to caliculate the "officeer time present" based on the caliculation.
caliculation part:
->Calicuationfield= timespent with Parents_activity accompained with Student_activity + timespent with Parents with out Studnet_activity + time in sports_activity.
Officer_present <-this is the field name
Student_activity
Parents_activity
sports_activity
Travellig_activity
other_activity
To get this in edit script i have wrote below logic please find.
/////// in the EDIT SCRIPT LEVEL i wrote this code/////////////////////////////
load *,
if(Officer_present='Parents_activity' or 'Student_activity',
if(Officer_present='Parents_activity' ,
if(Officer_present='sports_activity',time_spent_activity))) as Calicuationfield;
sql *from Officer_present_table;
Please give any suggesion to get the values.
Thanks in advance.......
Hi,
Try like this
LOAD
*,
If(Match(Officer_present , 'Parents_activity', 'sports_activity', 'Student_activity'), time_spent) AS Filter_time_spent
FROM DataSource;
Now use Filter_time_spent wherever you want.
Hope this helps you.
If you got the solution please Close this thread by giving Correct and Helpful answers to the posts which are helpful.
Regards,
Jagan.
Hi,
can you try this in edit script;
1) if(wildmatch(Officer_present,'Parents_activity', 'sports_activity', 'Student_activity'),'CALCULATION') as OFFICER_PRESENET_DERIVED //if you want only Parents_activity,sports_activity,Student_activity
2) if(wildmatch(Officer_present,'Parents_activity', 'sports_activity', 'Student_activity'),'CALCULATION',Officer_present) AS OFFICER_PRESENET_DERIVED2 //if you want other values of Officer_present
Regards,
Ajay
Thanks Jagan Mohan,
it is working fine.
Thanks ajay ajay,
it is working fine.
Thanks Aviral Nag,
but it is display the all time activitys. but it is working fine.
HI sujeeti singh,
i hope you find the my attachment file
now it is working fine.
Hi Jagan Mohan,
It is working fine when the officere time spent with parents_activity , sports_activity and studnet_activity
If(Match(Officer_present , 'Parents_activity', 'sports_activity', 'Student_activity'), time_spent) AS Filter_time_spent
Here we need to caliculate when officer time spent with sports_activity,student_activity and parents_activity or other_activity .
In this case how to add the parents_activity or other_activity .
Please give me any suggession.
Thaks in advance.
Hi,
Try this;
If(Match(Officer_present , 'Parents_activity', 'sports_activity', 'Student_activity'), time_spent) AS Filter_time_spent,
If(Match(Officer_present , 'Parents_activity', 'sports_activity', 'Student_activity','other_activity'), time_spent2) AS Filter_time_spent2
Note : sports_activity,student_activity and parents_activity or other_activity . Please explain what is AND,OR yo mentioned.
Regards,
Ajay
Hi ajay ajay,
and is commonly write to divide the 3 words but i have to get time spent with parent_activity or otheractivity along with studnet_activity,sports_activity.
please give me any suggession on this..
Hi,
Try this;
1) if(Officer_present='Student_activity' and Officer_present='sports_activity' or Officer_present='Parents_activity' or Officer_present='other_activity',time_spent,Officer_present) as NEW_FIELD;
2 ) if(Officer_present='Student_activity' and Officer_present='sports_activity' or Officer_present='Parents_activity',time_spent,
if(Officer_present='Student_activity' and Officer_present='sports_activity' or Officer_present='other_activity',time_spent,Officer_present)) as NEW_FIELD;
Regards,
Ajay