3 Replies Latest reply: May 2, 2017 11:08 AM by Liv ma RSS

    How to fill a default value if the identifier is missing in another table

    Liv ma

      hello

       

      I do not even know how to explain what I want to achieve in a short sentence so that is why the title of this thread is ambiguous.

       

      This is what I want to do:

      Say I have 2 tables:

       

      Table 1: Identifier, some value fields

      Table 2: Identifier, Field A

       

      the tables are linked via "Identifier"

       

       

      the set of identifiers in Table 1 is not the same as the set of identifiers in Table 2: some values are common, but there are identifiers in Table 1 which are not found in Table 2 and viceversa

       

      I need to generate a report which contains, for all the indentifiers in Table 1, the values in Field A from table 2

       

      for those identifiers in Table 1 which are not found in Table 2, I need to put a default value which I specify

       

      How do I do this?
      or, to put it another way, how do I identify which identifiers in table 1 are not found in table 2?

       

      In excel I would use and IF clause with "vlookup" and "IsError" and it would look like this:
      if

      vlookup returns an error because it cannot find one identifier from table 1 in table 2

      then

      put the default value which I specify

      else

      use the value returned by vlookup

       

      so I guess what I'm asking is which is the equivalent of "IsError" function from Excel in Qlik Sense?


      the problem is most likely trivial, but not for me

       

      thank you