Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

need resident load help

Hi,

I need to load SalesREP ID whose current sales value for the current month is >0, but for last 8 years's sales value will be 0.

So I have written the below code in script:

[TmpSalesRep]:

first 2

load 

[%Sales Trn Key],

[Process Date] as DateKey,

[Sales Amount USD] as SalesAmount,

[Sales Rep ID] as AsOfSalesRepID

resident [TmpTable]

  where

   [Process Month] = 'March' and [Sales Amount USD]>0;

left join

load

[%Sales Trn Key],

[Process Date] as DateKey,

[Sales Amount USD] as SalesAmount,

[Sales Rep ID] as AsOfSalesRepID

resident [TmpTable]

where

  [Process Date] >= '$(vPrevEightYearStartDate)' and

    [Process Date] <= '$(vPrevYearEndDate)' and

    [Sales Amount USD]>=0;

  //$(vCurrentMonth)

drop table [TmpTable];

Please let me know if I am wrong because I am getting wrong data.

10 Replies
Anil_Babu_Samineni

Seems, you are using Left join for resident table only. Unless your expression is okay to me. Can you describe more on Variables?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful