1 Reply Latest reply: Jun 1, 2015 3:12 PM by Marcus Sommer RSS

    Variable value with calculation

      I am pretty new to Qlikview so this might be a basic problem but I kindly request you guys to help.


      I have 3 input boxed White Glove (WG), Forced (FD) and Hybrid (HY). The user has to enter a percentage there between 0 to 100. The requirement is that the sum of the percentages of all three of them should not be more than 100.

      Meaning we can have cases like WG = 100, FD = 0 and HY =0 or WG = 50, FD = 25 and WG = 25.

      We cant have cases like WG = 100 FD = 10 and HY = 10.


      The user need to have an option of inputting any of the three values. Is there a way where we can create this. I tried creating three variables but the problem was that If i give a formula for that variable and use that variable in a input box the formula gets replaced by the value I type.


      Can you please tell me how we can implement this.



        • Re: Variable value with calculation
          Marcus Sommer

          You need to set some options within the inputbox properties in tab restrictions. There you enabled the options:


          entry-restriction --> "only predefined values"

          valuelist --> "predefined values as dropdown"

          predefined value --> "listed values"


          and you need to set the "listed values" per expression, maybe by a valuelist($(=SomeLogicToRestrictTheList)) which will be restricted on the already choosen values from the other variables. Then without you won't be able to avoid a sum over these variables which is greater then 100%. Such logic won't be easy and you will need some trial & error.


          - Marcus