Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
haneeshmarella
Creator II
Creator II

Current Week Selection on opening QVW

Hi guys,

I am trying to get the current week selection on opening my QVW file.

I have a date field DATE and week field WEEKSTART.

I have tried the following method but it does not work:

Settings > Document Properties > On Open > Add action > Add > Selection > Select In Field > Entered WEEKSTART in Field and tried

WEEKSTART(today()) or maxstring(WEEKSTART) but it does not work.

How do I achieve this? Is there any other way?

1 Solution

Accepted Solutions
haneeshmarella
Creator II
Creator II
Author

Found my problem, It's more of the expression problem, I used WEEKSTART(today()) or maxstring(WEEKSTART) as stated in question, but the right one which works is


MAX(WEEKSTART) and also the WEEKSTART filter had to be cleared before closing the file, and on reopening it gives the current week selection.


Thank you for your replies Nicole.

View solution in original post

16 Replies
Nicole-Smith

Make sure you put an = in front of your expression.

Working example:

Capture.JPG

haneeshmarella
Creator II
Creator II
Author

Nicole,

I did that but it did not work.

trdandamudi
Master II
Master II

What is the value in "WEEKSTART" ? Can you please check and see if the values are blank ?

haneeshmarella
Creator II
Creator II
Author

SS.PNGNo values are blank. They are the week start dates as in screen shot.

Nicole-Smith

It may have to do with the format of your dates.  Can you please attach a sample QVW so we can help you better?

trdandamudi
Master II
Master II

Can you please look into the attached sample file and see if it works for you:

haneeshmarella
Creator II
Creator II
Author

Found my problem, It's more of the expression problem, I used WEEKSTART(today()) or maxstring(WEEKSTART) as stated in question, but the right one which works is


MAX(WEEKSTART) and also the WEEKSTART filter had to be cleared before closing the file, and on reopening it gives the current week selection.


Thank you for your replies Nicole.

haneeshmarella
Creator II
Creator II
Author

Used the wrong expression, it works with MAX(WEEKSTART) and also the WEEKSTART filter had to be cleared before closing the file, and on reopening it gives the current week selection.


Thank you Thirumala.

haneeshmarella
Creator II
Creator II
Author

Being an MVP, would you happen to know how I could export a chart from my dashboard into excel using the script editor and not macros? I have many charts, but I would like to export only one particular chart among them, any idea?