15 Replies Latest reply: Mar 4, 2018 7:31 PM by Yeo Poh sai RSS

    =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?

    Yeo Poh sai


      Hi All


      I using below expression at dimension at table it does not filter G1 company  :-


      =IF(GROUP_CLASS='G1',COMPANY)


      it work for QV V12 , but does not work for QV9 and QS later version.


      May i know it is due to my data model issue ?


      Paul Yeo

        • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
          Yeo Poh sai

          My QVW

           

          As i over hear some one said in  the forum that if i manually remove sync key , i will have this issue.

           

          Paul

            • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
              Krishna Nagulapally

              Have seen you qvw,you are having few synthetic keys and some minor script issues.fix them.

               

              Usually no matter what, 

              =IF(GROUP_CLASS='G1',COMPANY) should work unless theres no data or due to some other script issues that is restricting COMPANY data to get populated.


                • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
                  Yeo Poh sai

                  Hi Krishna

                   

                  Thank you for your comment.

                   

                  When i do the filter at expression it work.

                   

                  Paul

                  • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
                    Yeo Poh sai

                    Hi Krishna

                     

                    Appreciate if you Can share with me what is my script issue , so that I can look into it. As I am not sure where I go wrong ?

                     

                    Paul Yeo

                    DIrector

                    TDS Technology (S) P/L

                    Whatsapp +65 9326 1804

                    www.tdstech.com<http://www.tdstech.com>

                      • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
                        Krishna Nagulapally

                        make sure you just have only one common key fields between any two tables.

                         

                        Synthetic keys:

                        1 group of tables in below pic : two common fields ExecPLstart and EXePLEnd between 'Interval Match' Table and ExecProfit Loss.

                         

                        Similary you can find synthetic keys formed by other fields in other tables in the rest of the table that i've grouped fro you.

                        1.PNG

                          • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
                            Yeo Poh sai

                            Hi Kri,

                             

                            Just to make sure what is your advise , for example in 2 table when they are link you , now there are 2 key , in order to reduce from 2 key to 1 key , i need to use the below script right ? For example my Supplier Table and GL Table have 2 key Date and Source.

                             

                            autonumber( @1:10T & '_' & 'TDSS' ) as ARKey,

                             

                             

                            Paul

                              • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
                                Krishna Nagulapally

                                Its not about reducing 2 fields to 1, its all about linking 2 tables with just ONE key field and that key field should be unique identifier field in the tables.

                                 

                                autonumber( @1:10T & '_' & 'TDSS' ) as ARKey,   - if this composite key is the index key in a table and unique identifier key in another table then yes you can use it, else it wont make any sense joining the tables with this key.you get undesired results on the UI if you dont link/join the tables properly.


                                Krishna

                                  • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
                                    Yeo Poh sai

                                    Hi Kri

                                     

                                    Thank you very much , your explaination I can understand.

                                     

                                    One more question is now the GROUP_CLASS field is giving me problem , and this field is at my order table.

                                     

                                    Can I said that GL Supplier P&L Table ( those table you highlight in the image ) will not affect the GROUP_CLASS field right ?

                                     

                                    Meaning my focus is to settle sales order table , should not have more then 1 field link between 2 table right ?

                                     

                                    Paul Yeo

                                    DIrector

                                    TDS Technology (S) P/L

                                    Whatsapp +65 9326 1804

                                    www.tdstech.com<http://www.tdstech.com>

                                      • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
                                        Krishna Nagulapally

                                        That i cannot comment as i dont know the business understanding of the tables that you are using.

                                          • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
                                            Yeo Poh sai

                                            Hi Kris

                                             

                                            Thank you very much .

                                             

                                            One more last question  , this particular field that having problem , I have using partial reload . Do you think that is partial reload approach is one of the reasons cause the problem ?

                                             

                                            Paul Yeo

                                            DIrector

                                            TDS Technology (S) P/L

                                            Whatsapp +65 9326 1804

                                            www.tdstech.com<http://www.tdstech.com>

                                              • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
                                                Krishna Nagulapally

                                                Partial reload is a different feature where if you want to reload only few tables(usually to update only few tables) from a large number of tables  in your data model.

                                                We use 'Add' or 'replace' right above the 'load' in script of that table and do the partial reload.if dont use 'Add' or 'replace' before the table,then it isnt called a partial reload.Please check partial reload from QLik documentation for more details.

                                                 

                                                Thanks

                                                  • Re: =IF(GROUP_CLASS='G1',COMPANY) it is cause by data model issue ?
                                                    Yeo Poh sai

                                                    Hi Kri

                                                     

                                                    My understand of partial reload is below , do you think this will create problem ?

                                                     

                                                    sales_G:


                                                    LOAD GROUP_CLASS,SOURCE,


                                                    //if(Exists(COMPANY),0,1) as NewFlag,


                                                        if (GROUP_CLASS='G1' and SOURCE='TDSS','G1',

                                                        if (GROUP_CLASS='G2' and SOURCE='TDSS','G2',

                                                        if (GROUP_CLASS='G3' and SOURCE='TDSS','G3',

                                                        if (GROUP_CLASS='G4' and SOURCE='TDSS','G4',

                                                    if (GROUP_CLASS='G5' and SOURCE='TDSS','G5',


                                                        if (GROUP_CLASS='G6' and SOURCE='TDSS','G6',

                                                        if (GROUP_CLASS='G7' and SOURCE='TDSS','G7',

                                                        if (GROUP_CLASS='G8' and SOURCE='TDSS','G8',

                                                        if (GROUP_CLASS='G9' and SOURCE='TDSS','G9',

                                                       

                                                        if (GROUP_CLASS='G12' and SOURCE='TDSS','G12',

                                                        if (GROUP_CLASS='G13' and SOURCE='TDSS','G13',

                                                        if (GROUP_CLASS='G1' and SOURCE='TDSKL','G1', 

                                                        if (GROUP_CLASS='G2' and SOURCE='TDSKL','G1', 

                                                        if (GROUP_CLASS='G1' and SOURCE='TDST','G1', 

                                                        if (GROUP_CLASS='G2' and SOURCE='TDST','G2', 

                                                        if (GROUP_CLASS='G3' and SOURCE='TDST','G3', 

                                                        if (GROUP_CLASS='G4' and SOURCE='TDST','G4', 

                                                        if (GROUP_CLASS='G1' and SOURCE='TDSPG','G1',

                                                        if (GROUP_CLASS='G1' and SOURCE='ADL','G1', 

                                                        ))))))))))))))))))) as [GROUPCLASS],

                                                       

                                                        if (GROUP_CLASS='G1' and SOURCE='TDSS','G1-GT',

                                                        if (GROUP_CLASS='G2' and SOURCE='TDSS','G2-AP',

                                                        if (GROUP_CLASS='G3' and SOURCE='TDSS','G3-SL',

                                                        if (GROUP_CLASS='G4' and SOURCE='TDSS','G4-CL',

                                                        if (GROUP_CLASS='G5' and SOURCE='TDSS','G5-RW',

                                                        if (GROUP_CLASS='G6' and SOURCE='TDSS','G6-PG',

                                                        if (GROUP_CLASS='G7' and SOURCE='TDSS','G7-BP',

                                                        if (GROUP_CLASS='G8' and SOURCE='TDSS','G8-KL',

                                                        if (GROUP_CLASS='G9' and SOURCE='TDSS','G9-TH',

                                                        if (GROUP_CLASS='G12' and SOURCE='TDSS','G12-EX',

                                                        if (GROUP_CLASS='G13' and SOURCE='TDSS','G13-ID',

                                                       

                                                        if (GROUP_CLASS='G1' and SOURCE='TDSKL','G1-ZA', 

                                                        if (GROUP_CLASS='G2' and SOURCE='TDSKL','G1-MS', 

                                                        if (GROUP_CLASS='G1' and SOURCE='TDST','G1', 

                                                        if (GROUP_CLASS='G2' and SOURCE='TDST','G2', 

                                                        if (GROUP_CLASS='G3' and SOURCE='TDST','G3', 

                                                        if (GROUP_CLASS='G4' and SOURCE='TDST','G4', 

                                                        if (GROUP_CLASS='G5' and SOURCE='TDST','G5', 

                                                        if (GROUP_CLASS='G1' and SOURCE='TDSPG','G1-DC',

                                                        if (GROUP_CLASS='G1' and SOURCE='ADL','G1',       

                                                        )))))))))))))))))))) as [GROUP_CLASS_O],


                                                        if (GROUP_CLASS='G1' and SOURCE='TDSS','G1-GT',

                                                        if (GROUP_CLASS='G2' and SOURCE='TDSS','G2-AP',

                                                        if (GROUP_CLASS='G3' and SOURCE='TDSS','G3-SL',

                                                        if (GROUP_CLASS='G4' and SOURCE='TDSS','G4-CL',

                                                        if (GROUP_CLASS='4' and SOURCE='TDSS','G4-CL',

                                                        if (GROUP_CLASS='G5' and SOURCE='TDSS','G5-RW',

                                                        if (GROUP_CLASS='G6' and SOURCE='TDSS','G6-PG',

                                                        if (GROUP_CLASS='G7' and SOURCE='TDSS','G7-BP',

                                                        if (GROUP_CLASS='G8' and SOURCE='TDSS','G8-KL',

                                                        if (GROUP_CLASS='G9' and SOURCE='TDSS','G9-TH',

                                                        if (GROUP_CLASS='G11' and SOURCE='TDSS','G11-AO',   

                                                        if (GROUP_CLASS='G12' and SOURCE='TDSS','G12-EX',

                                                        if (GROUP_CLASS='G13' and SOURCE='TDSS','G13-ID',

                                                        if (GROUP_CLASS='G1' and SOURCE='TDSKL','G1', 

                                                        if (GROUP_CLASS='G2' and SOURCE='TDSKL','G1', 

                                                        if (GROUP_CLASS='G1' and SOURCE='TDST','G1', 

                                                        if (GROUP_CLASS='G2' and SOURCE='TDST','G2', 

                                                        if (GROUP_CLASS='G3' and SOURCE='TDST','G3', 

                                                        if (GROUP_CLASS='G4' and SOURCE='TDST','G4', 

                                                        if (GROUP_CLASS='G5' and SOURCE='TDST','G5', 

                                                        if (GROUP_CLASS='G1/1' and SOURCE='TDST','G1/1', 

                                                        if (GROUP_CLASS='G1/2' and SOURCE='TDST','G1/2', 

                                                        if (GROUP_CLASS='G2/1' and SOURCE='TDST','G2/1', 

                                                        if (GROUP_CLASS='G2/2' and SOURCE='TDST','G2/2', 

                                                        if (GROUP_CLASS='G3/1' and SOURCE='TDST','G3/1', 

                                                        if (GROUP_CLASS='G3/2' and SOURCE='TDST','G3/2', 

                                                        if (GROUP_CLASS='G1' and SOURCE='TDSPG','G1',

                                                        if (GROUP_CLASS='G99' and SOURCE='TDSS','3Yr Stop',

                                                        if (GROUP_CLASS='G1' and SOURCE='ADL','G1',       

                                                        if (GROUP_CLASS='G1' and SOURCE='TDSID','G1',       

                                                        if (GROUP_CLASS='G2' and SOURCE='TDSID','G2',       

                                                       

                                                        ))))))))))))))))))))))))))))))) as [GROUP_CLASS_]

                                                       

                                                    //    if (GROUP_CLASS='G1' and SOURCE='TDST','G1', 

                                                    //    if (GROUP_CLASS='G2' and SOURCE='TDST','G2', 

                                                    //    if (GROUP_CLASS='G3' and SOURCE='TDST','G3', 

                                                    //    if (GROUP_CLASS='G4' and SOURCE='TDST','G4', 

                                                    //if (GROUP_CLASS='G5' and SOURCE='TDSS','G4-CL',

                                                      

                                                    resident sales;