by Tisztul_A_Visztula » Mon May 28, 2012 12:10 pm
Is it possible to code the following logics to a formula using Calculated fields? I wish to calculate 2 scores (Score_Gross and Score_Filtered) of each activity using the method defined by our national association of nature friends.
1. Let us check the month of the activity. If it is December, January, February, then the Score1 is 3, else Score1 is 0.
2. If the activity type is hiking OR running, Score2=Distance_in_km*1.5+Total_Ascents_in_m*0.02
if the activity type is cycling, Score2=Distance_in_km*0.5+Total_Ascents_in_m*0.01
3. I plan to manually record two fields called Cycling_distance_on_unpaved_roads_in_km and Cycling_ascent_on_unpaved_roads_in_m.
Score3=Cycling_distance_on_unpaved_roads_in_km*0.5+Cycling_ascent_on_unpaved_roads_in_m*0.01
4/a. Score_Gross=Score1+Score2+Score3
4/b if (Sum of Score_Gross's of all the activities on the same day >=20) then Score_Filtered=Score_Gross else Score_Filtered=0
So that is it. My first fear is linked to whether there is any formula to use the month of the Activity Date, my second concern is that how I can have a conditional Score_Filtered depending on the Sum of Score_Gross's on the same day.
What do you think, experts of this plugin? Should I give it up or is it possible to code my formula
Cheers,
Zoltan