4 Replies Latest reply: May 15, 2017 10:46 AM by Nicholas Truss

# Creating a Calculated Field in Data Manager with an If statement

Hi,

Trying to get my head around creating my first app using the data load manager rather than trying to mess around with the DLE which I have no experience with.

I've associated all of my tables etc and would like to add a calculated field to this:

 Vehicle ID Asset Type Monthly Cost 1 A 500 2 A 750 3 A 4 B 200 5 B 300 6 A 600 7 B

I would like to do a calculated field so that if the Monthly Cost field is blank then do an average of the monthly HP for that asset type which the monthly cost is not blank.

e.g. the first blank should return (500 + 750 + 600 ) / 3 = 616.66

2nd blank should return (200 + 300) / 2 = 250

Thanks,

Nick

• ###### Re: Creating a Calculated Field in Data Manager with an If statement

Do you need this solution at front end or back end?

• ###### Re: Creating a Calculated Field in Data Manager with an If statement

Hi Manish,

I am trying to add a calculated field to a table in the data manager.

Thanks,

Nick

• ###### Re: Creating a Calculated Field in Data Manager with an If statement

e.g. the first blank should return (500 + 700 + 600 ) / 3 = 616.66

where did 700 come from? and why only(500 + 700 + 600 ) / 3 = 616.66

can you explain the logic clearly?

• ###### Re: Creating a Calculated Field in Data Manager with an If statement

Sorry that was a typo, should be 750 from the 2nd row.