Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can someone please explain the parameters base and offset in the Ceil function with an example. Please do not copy paste the explanation from the help manual as I did not understand from that?
1. ceil( 3.88 , 0.1 ) returns 3.9
2. ceil( 3.88 , 5 ) returns 5
3. ceil( 1.1 , 1 , 0.5 ) returns 1.5
How qlikview produces the result in above three scenarios?
Thanks in advance for your help.
In 1) you are asking ceil to round up to the nearest multiple of 0.1, which is 3.9
0.0, 0.1, 0.2, 0.3, 0.4, etc
In 2) you are asking ceil to round up to the nearest multiple of 5, which is 5
0, 5, 10, 15, 20, etc
Edit:
I had read your function wrong for option 3 (so removed that part of my reply). I am correctly corrected by the reply underneath this one.
Ceil() rounds x up to the nearest multiple of step [+ offset]
Hence in case 3), it's rounded up to the nearest value of 0.5, 1.5, 2.5, 3.5 ...
For the value of 1.1, the result is thus 1.5.
Same for any value >0.5 and <=1.5
I undrestand now.Thanks all for your reply