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

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

join

Hello,

I have this table:

End_User: ( name, order_date,....)

I wanna create a table from this one which contains End-users who have order_date=2013 and  order_date=2012

which means End-users who made orders in 2012 and 2013

How can I do that?

4 Replies
RedSky001
Partner - Creator III
Partner - Creator III

Google "master calendar qlikview"

Not applicable
Author

Hey,

Just put this in the load script on its own tab

//     ************
MinMax Table ****************
     
MinMax:

      
LOAD

            
Min(OrderDate)           AS MinDate,

            
Max(OrderDate)           AS MaxDate

      
RESIDENT

           
Orders;



            
//   
************ Create Min and Max Variables ****************
      LET vMinDate = NUM(PEEK('MinDate', 0,
'MinMax'));

      
LET vMaxDate = NUM(PEEK('MaxDate', 0,
'MinMax'));

      
LET vToday   = $(vMaxDate);




//   
************ Temporary Calendar ****************
     
TempCal:

      
LOAD

            
DATE($(vMinDate) + rowno()
-1)        
AS TempDate

      
AUTOGENERATE

            
$(vMaxDate) - $(vMinDate) + 1;

            

      
DROP TABLE MinMax;




//   
************ Master Calendar ****************
     
MasterCalendar:

      
LOAD

            
TempDate                              AS OrderDate,            //Join
to Orders Table
            WEEK(TempDate)                        AS Week,

            
YEAR(TempDate)                        AS Year,

            
MONTH(TempDate)                       AS Month,

            
DAY(TempDate)                         AS Day,

            
WEEKDAY(TempDate)                     AS WeekDay,

             'Q'
&
CEIL(MONTH(TempDate) /
3)       
AS Quarter,

            
DATE(MONTHSTART(TempDate),'MMM-YYYY') AS MonthYear,

            
WEEK(TempDate) & '-' &Year(TempDateAS WeekYear,

            
INYEARTODATE(TempDate,$(vToday),0) * -1 AS CurYTDFlag,

            
INYEARTODATE(TempDate,$(vToday),-1)* -1 AS LastYTDFlag

      
RESIDENT

           
TempCal

      
ORDER BY

            
TempDate ASC;

      

      
DROP TABLE TempCal;

Not applicable
Author

ok thanks

er_mohit
Master II
Master II

See the attache file

hope it helps