# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Contributor II

## very tricky - calculation based on base KBIs

Hi all,

Here I have

ID- id of KBI

name - name of the KBI

calculation - formula how to calculate the KBI

 ID name calculation 16 a ([100017]/[100013]) 17 b (([100001]+[100002]+[100003])/[100013]) 18 c ([100001]/([100023]*[100004])) 100023 d [100023] 100004 e [100004] 19 f ([100023]*[100004]) 100018 g [100018] 100017 h [100017] 100013 i [100013] 100001 j [100001] 100002 k [100002] 100003 l [100003]

Now I want to calculate kbi-s 16,17,18, 19   using the formula in 'calculation' field. This calculation has to be in the layout because every base kbi - ID filed - has in the Database its Numerator and Denominator that's why I have to calc all the kbis in the layout

Any suggestions how to do it?

3 Replies
Not applicable

## Re: very tricky - calculation based on base KBIs

Hi Ivan,

you can use a mapping table in the script to map ID as calculation

Then use applymap('MapTableName', ID)  as Expr

And use Expr in calculation field

best regards

christian

Honored Contributor II

Hi Ivan,

Jason

Contributor II

## Re: very tricky - calculation based on base KBIs

Hi Jason, Chris,

the problem here is much more complicated, but the mistake is mine as I didn't say it in a more detailed way.

Every base KBI comes from BW with Numerator and Denominator - there is not only one Field as a Value. So you have to divide by the denominator , other cases also occur ...

However thanks, I will try to figure out this case with my own forces. I have developed a lot so the last 5% are waiting to be done (but the hardest)