Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

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

4 Replies

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

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

Not applicable

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

vinieme12
Esteemed Contributor II

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?

Not applicable

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

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