# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!
cancel
Showing results for
Did you mean:
Creator II

## Table

Hi team,

I need this kind of output..

 Current Scheme New Scheme Sl Num Bonus % Current IncrementalBonus % New 7 3.25% 227,500 0.50% 35,000 H4 8 3.50% 280,000 11.00% 145,000 H5 9 3.75% 337,500 11.00% 255,000 H6 10 4.00% 400,000 12.50% 380,000 H7 11 4.25% 467,500 12.50% 505,000 H8 12 4.50% 540,000 12.50% 630,000 H9 13 5.00% 650,000 12.50% 755,000 H10

However, We need to calculate the Current and New column.

Formula for Current is = Sl num*Bonus*1000000

Formula for New is = Sl num*IncrementalBonus %*1000000

Formula for New is = Sl num*IncrementalBonus %*1000000+H4

Formula for New is = Sl num*IncrementalBonus %*1000000+H5

Formula for New is = Sl num*IncrementalBonus %*1000000+H6

Formula for New is = Sl num*IncrementalBonus %*1000000+H7

Formula for New is = Sl num*IncrementalBonus %*1000000+H8

Formula for New is = Sl num*IncrementalBonus %*1000000+H9

Kindly Help me in this

7 Replies
Contributor II

Can you attach any file?

Creator II
Author

Which File should I attach?

Creator II
Author

This is the Inline table I have where we give the data for every column expect current and new column.

For the current and new we need to calculate by the following formulas:

For the Current Column formula is straight forward for all the :

Sl_num*Bonus*1000000.

For the New column formula is as follows:

For the first row:

Sl_num*incrematalBOnus*1000000

For the second row:

For the third row:

Kindly help me in this..........

Partner - Creator II

Hi,

for the first column the formula is straight forward

([Sl Num]*Num(Num#([Incremental Bonus %],'##.##'))*1000000) as Column

For new column calculation you can use the following script in your load script(orange highlight script)

Main:
Sl Num,Bonus %, Current,Incremental Bonus %,New,dim
7, 3.25, 227500,0.50,35000,H4
8, 3.50, 280000,11.00,145000,H5
9, 3.75, 337500,11.00,255000,H6
10, 4.00, 400000,12.50,380000,H7
11, 4.25, 467500,12.50,505000,H8
12, 4.50, 540000,12.50,630000,H9
13, 5.00, 650000,12.50,755000,H10
];

Final:
Text(([Sl Num]*Num(Num#([Incremental Bonus %],'##.##'))*1000000)&if(not IsNull(Previous(dim)),'+')&Previous(dim)) as new_Column

Resident Main;

Regards,

Prashant

Creator II
Author

Hi Prashanth,

But the Dim column which you have speciied in the Inline that will be not loaded in the script..

Just for the Reference I have mentioned in that..

Specialist III

New= (Sl num*IncrementalBonus *1000000)+ (Previous(Sl num)*Previous(IncrementalBonus )*1000000)

try this

Channa
Creator II
Author

Hi Channa,

But Im not getting the desired output..

Output which I'm getting after your suggestion...

 Sl_num Bonus% Kickback Amt, Current scheme Incremental_Bonus% New_value Desired_value 7 3.25 227500 0.50 - 35000 8 3.50 280000 11.00 885000 145000 9 3.75 337500 11.00 1100000 255000 10 4.00 400000 12.50 1360000 380000 11 4.25 467500 12.50 1500000 505000 12 4.50 540000 12.50 1625000 630000 13 5.00 650000 12.50 1750000 755000

The desired value in table which i'm expecting as the output..

Help me in this

Tags
Community Browser