Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Current Week Selection from old dates

Hello Everyone,

I am new to QlikView, I have a task where I have a field named as Last Invoiced as below

                                      qli.png

my task is to 'Show the list of customer list who's invoice date is in current week'

then how I explore the current week date from the given old date. please  help me out.

Thank you.

1 Solution

Accepted Solutions
its_anandrjs

Ok then you have to try this in any list box expression

=if(Week([Last Invoiced]) = week(Today()), [Last Invoiced])

Or

=if(Week([Last Invoiced]) = week(Today()), Date([Last Invoiced]) &'_'& Week([Last Invoiced]))

But bu this you get data for all years but only for current week that is week 20, and if you get more data then select year value in the list box.

View solution in original post

16 Replies
Not applicable
Author

Try this Bhawna,

if(week(date) = week(today()), date, NULL)

its_anandrjs

For a list box you can write like

=If( YourDateField >=WeekStart(Today()) and YourDateField  <=WeekEnd(Today()),YourDateField)

Eg:-

=If( [Last Invoiced] >=WeekStart(Today()) and [Last Invoiced]  <=WeekEnd(Today()),[Last Invoiced])

Not applicable
Author

Today() returned system date..

Not applicable
Author

Right, and using week(today()) will return the current week... I.e. 5/15/2014 is week 20. Any week(date) that also returns 20 will be in your list box.

Not applicable
Author

it doesnt work

Not applicable
Author

there is no such any week,all the dates before the month May  I have checked..

Not applicable
Author

in the table only May month is not added,may be after the may month it will work

its_anandrjs

You want to fetch invoice date is in current week but if you not have current week dates so how you get that for old dates it won't compare. The reply i give from that i get current week dates like From 5/12/2014 to 5/18/2014.

Not applicable
Author

That is my question,I have assigned this task,and told me to consider invoice date as today date,so I am not able understand how is this possible.