Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ganeshreddy
Creator III
Creator III

Expression for beginning of prior moth in script?

Hi All ,

Can anyone provide me pseudo code for below requirement, i am finding difficulty in getting code for beginning of prior moth in script.Please find the underlined content.

req:

  • From the QVD sourced from the workorder table, extract the count of records by year month and client and add to Qlikview table:
    • code=1
    • c_code=’01’
    • completionDate between the beginning of prior month and the end of current month
    • Day difference between wo_completiondate and wo_requestdate is <=1
    • ProjNum is null


Ex: WO:

       wo_Num,

          code,

         c_code,

        Wo_completionDate,

        Wo_requestdate,

               ProjNum

              d_code

       From 

     

      Sumarry:

       *,

Month(date(now())) as Month,

year(date(now())) as Year,

d_code as [source],

count(wo_number) as [No Of Work Orders]

resident WO where  code= 1 and c_code = '01' group by .....;

Best Regards,

Ganesh.

       

      

1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

... Where WO_completionDate >= AddMonths(MonthStart(Today()),-1) and WO_completionDate <= MonthEnd(Today())

HIC

View solution in original post

1 Reply
hic
Former Employee
Former Employee

... Where WO_completionDate >= AddMonths(MonthStart(Today()),-1) and WO_completionDate <= MonthEnd(Today())

HIC