4 Replies Latest reply: Nov 3, 2016 11:40 AM by Nicole Smith RSS

    Combining tables and excluding values based on a specific heirarchy

      I have a chart that is bringing in fees for accounts from two tables; Global fees and Hard Coded Fees. Every account is set up with a Global Fee structure based on numerous criteria, however, there are exceptions where the Global fees are overridden by fees which are hard coded in by the end user.


      Furthermore, for the Global Fees, most accounts have at least two Global Fees attached to them, an Admin Fee & NO FEE. However, there are some exceptions where there is only one value returned under Global Fees which is NO FEE.


      For the purposes of my Qlikview app, I need to just have one fee associated with each account with the following logic:


      If there is a value under Hard Coded Fee, use that

      If there is not a value under Hard Coded Fee, of the two values returned under Global Fee, use the one that is an Admin fee

      If there is only value returned under Global Fee use that value


      Please see the two charts below for an example of what I need to do:


      Data currently is returned as:


      Acct IDGlobal FeeHard Coded Fee


      Admin 2%-
      100NO FEE-
      101Admin 1.25%Admin 1.75%
      101NO FEEAdmin 1.75%
      102NO FEE-
      103Admin 1.25%-
      103NO FEE-
      104Admin 1.75%Admin 1.50%
      104NO FEEAdmin 1.50%


      What I need the data to return as:


      Acct IDFEE
      100Admin 2%
      101Admin 1.75%
      102NO FEE
      103Admin 1.25%
      104Admin 1.50%


      Any help would be greatly appreciated.


      -J D.