Lock Row Total

Options

Hi All,

 

Can board lock row total with alert?

example: max rowtotal=10 

Jan   Feb   Mar   rowtotal

5         5        ?      10

 

If user input qty on Mar and rowtotal >10 will be shown warning.

Answers

  • Andrea Florio
    Andrea Florio Active Partner
    First Anniversary First Comment 5 Up Votes 5 Likes
    edited March 2020
    Options

    hi Wahyu Nugraha,

    i don't think it is possible but maybe i have a trick.

    You can copy the dataview and in the copied dataview set a normal alert and remove all the entities from axes.

    In my esemple i put the alert on 500.

    In this way you have an alert on the total. You can remove the total form first dataview an put the second dataview under the first.

    Reguards

    Andrea

    image

  • Previous Member
    edited March 2020
    Options

    Hi,

    Andrea's solution is the better if you need only a warning.

     

    If you want have a more robust Lock you have to use a simple procedure what will run as trigger on data entry.
    You must create two cube  "MAX" and "CHECK" with a dummy dimension and a Mirror cube with the same dimensions of your data entry cube.

    max is the cube where write the max value for the montlhy cube.

    image

    In the view above you have an exemple of a dataentry form.

    You must set a trigger procedure on layout  like this:

    image

    1. Check = Max - TMP1
    2. if Total of TMP1 > MAX then Check <0  then Error and data on TMP1 will be replaced with the previous ones and a error message will be displayed
    3. otherwise update TMP2 with the data inserted in TMP1

     

    You can improve the procedure as you like.

  • Unknown
    edited March 2020
    Options

    Wahyu Nugraha you might also want to consider locking the row total so it is impossible for the user to change it, so no need for a warning.  Below I have done exactly this:

    image

    Any data entry will adjust all other items in proportion, thus always arriving at 13,887,143 in total.

    The Budget Amount Block:

    image

    Block b is of course the algorithm that I am using as the lock (which you would probably hide)

     

    This option would not be suitable if you only wanted to warn the user that they have exceeded the set limit, or if you did not want proportional changes to the other rows.  Nice to understand it as an option though.