How can I round an input number in the dataview

I have a dataview in which I want sales persons to add the number of quantities that they will sell per month. For this I only want them to be able to enter whole numbers and not decimals. With the validation rule I am already able to set that the number should be zero or higher (so negative numbers are not allowed), however it it still possible to enter decimal numbers into the dataview and therefore also in the cube.

 

As it should be possible to enter numbers above 32.000 I cannot limit the cube to an integer value, so I had to set it to double.

 

I can hide the decimals in the dataview, however this then also makes it invisible if decimals are used.

 

I prefer to have a rounding solution somewhere, but I am not sure how to solve this.

 

Who can help me?

Tagged:

Answers

  • Maybe a reverse algorithm could do the trick. Just hide the cube (with data entry enabled) and add an algorithm set to the cube block, with data entry enabled, and a reverse algorithm that says (cube block) = round(algorithm block, rounding precision). So the end user is entering values into the algorithm block, which is then writing the result of the rounding formula into the cube.

     

    HTH

  • Coos Bos
    Coos Bos Customer
    Fourth Anniversary First Comment

    Dear J C

     

    Thanks for your answer.

    I have been working on this yesterday and this morning, also using the online help as the reverse algorithm is quite new to me.

    I can't get it to work in my case as the Quantity cube has in the dataview a detail by year (or by month) setup. If I take the detail by year away, it works. However when I enter the detail by year (and having the data cube and the algorithm cube both visible and both with detail by year), I can see that when I enter a number in the data cube field, it will only go to the algorithm cube after a save action. However there will be no action if you enter something in the algorithm cube and do a save; the data cube stays empty/does not change.

     

    Is there a way to solve this, as the reverse algorithm is a nice tool?

     

    Thanks a lot