Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

calculate field in load editor

Hi, I have problem with create new field in the load data editor

Capture.PNG

Capture.PNG

I would like to have a field to calculate if the KPIs performance exceed the target by more than 10 %, the following is what i try to do, but it fails.

AdditionTable:

Load

  "KPI(s)",

    if(((Sum({$<Types={'Performance'}, Months={'1/12/2015'}>} KPIValue) - Sum({$<Types={Target}, Months={'1/12/2015'}>} KPIValue))/Sum({$<Types={Target}, Months={'1/12/2015'}>} KPIValue))>=0.1, ('Yes'), ('')) as "MoreThan10%"

Resident KPIDetails;

4 Replies
phaneendra_kunc
Valued Contributor III

Re: calculate field in load editor

You can not write set expression in LOAD statement. you have to create multiple tables and perform this operation in load script.

Is there a reason you have to compute this in LOAD script?

Not applicable

Re: calculate field in load editor

Hi Phaneendra Kunche, thanks for replySmiley Happy  i would like to count the number of KPI exceed the target by more than 10%, and able to trace those KPIs in detail.

balkumarchandel
Valued Contributor II

Re: calculate field in load editor

If you just want to get the count of KPI's which exceed 10% of target.

you can move your expression in UI side because Set expressions are not allowed in Script side.

or you can remove you set analysis use group by in your load and do your aggrigation (Sum()) including other required conditions.

Thanks

BKC

nizamsha
Valued Contributor

Re: calculate field in load editor

If(sum({$<Type={"Target"}>} Amount)>(sum({$<Type={"Performance"}>} Amount) and

sum({$<Type={"Target"}>} Amount)>10),

sum({$<Type={"Target"}>} Amount))

Might be u r looking like this

Community Browser