Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mohamed_ahid
Partner - Specialist
Partner - Specialist

load inside loop

i'm trying to construct this table :

[Semaine Analyse],

[Key Client] ,

Week,

[Transaction V0]

[Transaction V1]

using two load inside one loop .

Load

         $(v) as [Semaine Analyse],

         [Key Client] ,

         week([Key Date]) as Week,

         sum([Montant payé]) as [Transaction V0]

         resident Transactions

         where week ([Key Date])>=$(Semaine1) and week ([Key Date])<=$(Semaine2)

         group by  [Key Client], week([Key Date]) ;

and

Load

         $(v) as [Semaine Analyse],

         [Key Client] ,

         week([Key Date]) as Week,

         sum([Montant payé]) as [Transaction V1]

         resident Transactions

         where week ([Key Date])>=$(Semaine3) and week ([Key Date])<=$(Semaine4)

         group by  [Key Client], week([Key Date]) ;

the loop :

For v = 1 to 27

   

      Let    Semaine1 = week(Today())-($(v)*2);

      let    Semaine2 = week(Today())-($(v)*2)+$(v)-1;

       Let    Semaine1 = week(Today())-($(v)*2);

      let    Semaine2 = week(Today())-($(v)*2)+$(v)-1;

    

  the place of my load

          

            

      Next v

how to do that plz ?

thx

10 Replies
mohamed_ahid
Partner - Specialist
Partner - Specialist
Author

do you know why i can't use the TableA within a load script using resident ?