Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

As per calender week

Hi all,

Addition to this

below link I got the week count as per db.

  My current requirement is  : I have week column coming from db.    so I want to get the count of current week  like week(today())   that is 36.   and if the data is not available for current week it should show "0"

Example1:

weekNumber

36     ---10records

35   ---5 records        

output:

current week as per calendar is 36 ---   so it will give 10

last week as per calendar is 35 ----it will give 5

Example1: 

weekNumber

36     ---10records

34   ---5 records         

current week as per calendar is 36 ---   so it will give 10

last week as per calendar is 35  so here 34 only there so it will give  "0" as output.

Re: Need Week count

1 Reply
Anil_Babu_Samineni

You can manipulate in script like

Load ...., If(Week<> Week(Today()), '0', Week(Today())) from DB;

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