4 Replies Latest reply: Oct 25, 2011 9:03 AM by fabio+paolo Mazzone RSS

    associating data with "OR"

      Hello Everyone,

      I'm consolidating data from two different sources.


      In one source I have the hours reported for certain type of actitivieties from people.

      In the second source I have the hours reported for other types of actitivieties from the same people.


      The name of people differs slightly, though people are the same and sometimes the same person has been assigned with 2 or 3 names.


      So I did a mapping file where I created the correspondence between the names and the real people with rows like this:

      - real person 1, name in source 1, name in source 2

      - real person 1, another name in source 1, name in source 2


      This does not work:

      - qlikview complains for a loop

      - an unwanted relation between activities has been created as a kind of filter, for a person now I see activities only when he/she did activities in the source 1 AND source 2.


      What am I doing wrong??



        • associating data with "OR"
          Stefan Wühl



          are you using mapping load and applymap to map your Names?


          Please look at this example, hope it helps:



          LOAD * INLINE [

          NameS1, Value

          Stephan, 10




          LOAD * INLINE [

          NameS2, Value2

          Steffan, 20




          mapping Load * INLINE [

          NameS1, Real

          Stephan, Stefan




          mapping Load * INLINE [

          NameS2, Real

          Steffan, Stefan




          ApplyMap('Map1', NameS1) as Name,


          resident Source1;



          ApplyMap('Map2', NameS2) as Name,

          Value2 as Value

          resident Source2;


          drop Tables Source1, Source2;

            • associating data with "OR"

              Hi swuehl,

              swuehlthank you.



              that let me understand the insight of what's going on.


              Result is the same I obtain a loop.


              Is the "value" you add a sort of field added on purpose to avoid loops?



                • associating data with "OR"
                  Stefan Wühl

                  You shouldn't get any loops at the end. Could you post your app or the relevant part of your scipt here?


                  The field "value" above is not really needed, but using the field and different values on each record (like a recno()), you could easily the resulting table (so I get unique records and all my records are shown e.g. in a table box.


                  But it should just indicate that there could be another one or more fields in the source table besides the Name.


                  The important thing in my example is the use of mapping tables and applymap, please refer also to the manual for that. You could also use only one mapping table instead of two, this will just hold all variations of names and the correlated real name.


                  Hope this helps,