15 Replies Latest reply: May 14, 2010 4:34 AM by AnkitModi RSS

    Set Analysis

    AnkitModi

      Can please Some one share a notes on Set Analysis..

       

      Thanks

      Ankit

        • Set Analysis
          Shivarama krishna K

          Hi,

          Which version of Qlikview you are using?

          If you are using Qv 9 then go to help and just type set analysis u will find lot of example related to Set Analysis.I feel those examples will definitely help you to understand what it is.........

          and practise few of them to get hands on experience and also try to understand how set analysis expression are written in few of the QlikView examples available when u open QlikView

           

          Regards,

          Ajay

            • Set Analysis
              AnkitModi

              HI Ajay,

              I am using Qlikview 8.5.. and i am not getting enough examples through wihich i can practise..

              Please help me if u have any solution or docs for this.

              Thanks,

              Ankit

               

               

                • Set Analysis
                  Shivarama krishna K

                  Hi,

                  Download the Qv 9 Personal Edition and install it in some other machine and as i said earlier in Qv 9.0 u can go to help and search for Set Analysis in INdex .I hope this will help u alot and meanwhile i will try to send any douments related to that.........

                   

                  Regards

                  Ajay

                  • Set Analysis

                    Here's a document presented by Tom Mackay regarding Set Analysis.

                      • Set Analysis
                        Shivarama krishna K

                        Hi ,

                        Anthony Thanks alot . The document you shared will be very much helpfull to everyone.....

                         

                        Ankit

                        Have u gone through the doc shared by Anthony ,Hope your problem is solved...

                         

                        Regards

                        Ajay

                         

                          • Set Analysis
                            AnkitModi

                            Thanks a lot.. it's realy helpful.

                            Ajay,

                            Thanks for your support..

                            I am sorry Guys but i am new to this so asking more. do u have such types of notes realted to MApping Load. and have a query on this too. As i use mapping load with simple 2 tables and i have read that its and alternative option of joins. but how to use left.right join in this??

                            Please help my query using Mapping Load instead of using JOIN, I have 2 table

                            Table1:

                             

                            IR_DPDno of Accts
                            0 - 29 DPD24,443
                            30 - 59 DPD11,770
                            60 - 89 DPD8,426
                            90 - 119 DPD8,001
                            120 - 149 DPD1
                            180 - 209 DPD1
                            240 - 269 DPD1
                            390 - 419 DPD2
                            Current317,066
                            GWO3,938
                            NCL68,928


                            Table 2:

                             

                            IR_DPDFullPOSPOS
                            0 - 29 DPD631,626,1081
                            30 - 59 DPD303,230,5182
                            60 - 89 DPD215,404,7293
                            90 - 119 DPD203,847,2304
                            120 - 149 DPD320,9465
                            180 - 209 DPD376,8626
                            240 - 269 DPD914,5507
                            390 - 419 DPD497,4578
                            Current12,394,438,4309


                            Now i want the Table 2 data should join into Table1(using mapping load). not Table 1 to table 2 and the output i should get is:

                             

                            IR_DPDno of AcctsFullPOSPOS
                            0 - 29 DPD24,443631,626,1081
                            30 - 59 DPD11,770303,230,5182
                            60 - 89 DPD8,426215,404,7293
                            90 - 119 DPD8,001203,847,2304
                            120 - 149 DPD1320,9465
                            180 - 209 DPD1376,8626
                            240 - 269 DPD1914,5507
                            390 - 419 DPD2497,4578
                            Current317,06612,394,438,4309
                            GWO3,938--
                            NCL68,928--


                             

                            Thanks

                            Ankit

                             

                             

                              • Set Analysis
                                AnkitModi

                                Thanks Anthony, ur notes are very useful and solving my queries..

                                • Set Analysis

                                  Use codes as under

                                   

                                  Map1;

                                  mapping LOAD * INLINE [

                                  x,y

                                   

                                  0 - 29 DPD,24443
                                  30 - 59 DPD,11770
                                  60 - 89 DPD,8426
                                  90 - 119 DPD,8001
                                  120 - 149 DPD,1
                                  180 - 209 DPD,1
                                  240 - 269 DPD,1
                                  390 - 419 DPD,2
                                  Current,317066
                                  GWO,3938

                                  NCL,68928];

                                   

                                  map no of Accts using map1;

                                   

                                   

                                  Now load your table and add a column o fof Accts to it whihc has the same values as IR
                                  _DPD

                                   

                                  that should work

                                    • Set Analysis
                                      AnkitModi

                                      Didn't got what you are saying.

                                        • Set Analysis

                                          Add the mapping table as suggested above

                                           

                                          then load your table which has the data as IR_DPD FullPOS & POS in addition to that add another column to the data and name it as no of Accts and the values in it would be same as in the IR_DPD column

                                          in this case the code above would work

                                          But couldnt get you why don't you just join the two tables - is easier

                                            • Set Analysis
                                              Shivarama krishna K

                                              Hi Ankit,

                                              As Umang said join is the right thing here and i feel it will be the better one ,Since in this scenario Join will results better performance

                                              and second thing like in the above scenario u r performing Join Operation only and there is no use of Mapping at all.......

                                              Regards,

                                              Ajay

                                                • Set Analysis
                                                  AnkitModi

                                                  HI Ajay,

                                                  Thanks for the reply, i know join would be the option,but we were told to use MApping load isntead of Join in the above example so i was not aware of it and not much idea of Mapping so i had requested the code for Mapping load to get the desired output. And want to learn something related to Mapping Load.

                                                  Thanks

                                                  Ankit

                                                    • Set Analysis

                                                       


                                                      MAP_K:
                                                      Mapping LOAD * INLINE [
                                                      IR_DPD, no of accounts
                                                      0 - 29 DPD, "24,443"
                                                      30 - 59 DPD , "11,770"
                                                      60 - 89 DPD, "8,426"
                                                      90 - 119 DPD , "8,001"
                                                      ];
                                                      P:
                                                      LOAD * INLINE [
                                                      IR_DPD, FullPOS, POS
                                                      0 - 29 DPD , "631,626,108 ", 1
                                                      30 - 59 DPD, "303,230,518", 2
                                                      60 - 89 DPD , "215,404,729", 3
                                                      ];

                                                      Final:

                                                      Load IR_DPD,
                                                      applymap('MAP_K',IR_DPD) as [no of accounts],
                                                      FullPOS,
                                                      POS
                                                      Resident P;
                                                      Drop Table P;




                                                      Try the above code,it will definitely work. I have dropped the table because it is creating a synthetic table and we dont need to have table P because its almost the exact copy of final without the field 'no of accounts'.