Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bharatkishore
Creator III
Creator III

Join

Hi All,

I have the following code:

T1:

LOAD distinct Plant,

     If(Country='Korea, Republic of','Korea',

         if(Country='Russian Federation','Russia',

           if(Country='United Arab Emirates','Arab Emirates',

              if(Country='United States','USA',

                if(Country='Viet Nam','Vietnam',Country))))) as Country,

     Comment_New,

     BU,

     District,

     [System Code],

     Entitlement,

     [Material Groups],

     Flag,

     YearMonth,

    

     Cons_YTD,

    

     Cons_YTD_LY

    

FROM

[..\5_QVD\IS_QVD4\Modality_Report_temp14bb.qvd]

(qvd);

left join(T1)

LOAD distinct Plant,

     Part_Type as Comment_New,

     Contract_Type as Entitlement,

     BUEqui as BU,

//     Country,

     Strategic_Flag as Flag,

     YearMonth,

//     Fiscal_Month,

//     Calendar_Year,

     ITM_Consumption,

     ITM_IB,

     YTD_Consumption,

     YTD_IB,

     YTD_Consumption_LY  ,

     YTD_IB_LY,

     ADJ_CONS_YTD_LY,

//     Country_CR,

//     Country_Final_temp,

      If(Country_Final='Korea, Republic of','Korea',

         if(Country_Final='Russian Federation','Russia',

           if(Country_Final='United Arab Emirates','Arab Emirates',

              if(Country_Final='United States','USA',

                if(Country_Final='Viet Nam','Vietnam',Country_Final))))) as Country

FROM

[..\5_QVD\IS_QVD4\Adj_Factors_for_Modality_report_Query4.qvd]

(qvd);

But when i do a left join the values are getting wrong for ADJ_CONS_YTD_LY. Before join i am getting around 497k but after join i am getting 2511K

Can you please help me where i am doing wrong.

Thanks,

Bharat

33 Replies
sunny_talwar

May be Sum your measure from Modality_Report_temp14bb.qvd

Capture.PNG

Because you have multiple rows for your key, the join is duplicating.

bharatkishore
Creator III
Creator III
Author

So i need to do for all the measures in 14bb qvd right sunny bhai..

Buti have tried that as well and it is not working..but will do again..

If you have done it can you please attach the qvw and send to me..

sunny_talwar

I am not entirely sure to be able to do this... do you multiple YearMonth in 14bb? If you do... then do you also have YearMonth in the other file? Again, don't have the full picture... so very difficult to suggest anything

bharatkishore
Creator III
Creator III
Author

No sunny bhai, i don't do multiple yearmonth..

just for the two tables i need to join and the value shouldn't change after doing join..

instead of join do i need to any other proces..