Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Rounding problem

Hi to all,

I have the following data:

group1group2group3val
A1B2X15,3451
A1B2Y20,4511
A1B2Z41,3983
A1B2W22,8055
A1B3X22,8756
A1B3Y41,7893
A1B3Z13,8733
A1B3W21,4618

The sum of A1-B2 where group3 = X,Y,Z, W is 100 and the same for A2-B2.

I need to get the field val as an integer and still have the total to 100.

the result can be something like:

group1group2group3val
A1B2X15,345115
A1B2Y20,451121
A1B2Z41,398341
A1B2W22,805523





A1B3X22,875623
A1B3Y41,789342
A1B3Z13,873314
A1B3W21,461821

Any idea to reach that?

Thanks!

1 Reply
Not applicable

Re: Rounding problem

Hi use the CEIL function

...

NUM(CEIL(val, 0.1), '#.#00')

...

Community Browser