Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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?

16 Replies
Nicole-Smith

If you add a {1} in your set analysis (like in my example), you won't need to worry about clearing selections because it will select the MAX regardless of selections.

Nicole-Smith

If you're only looking to store data into a file, you can STORE INTO (txt) the same way you would STORE INTO (qvd).

Example:

STORE TableName INTO FilePath\FileName.csv (txt, delimiter is ',');

haneeshmarella
Creator II
Creator II
Author

My query usually draws lot of data, out of which I use only few fields to create a pivot table. I would like to export only that pivot table which contains various expressions that are not in the script to store it in the Excel or txt.

How do I achieve this? I want the specific pivot table as I have to email it to certain groups of people so I do not want the entire data similar to QVD to be in the Excel, if this makes sense?

Nicole-Smith

Programmatically?  You would need macros or NPrinting.

Manually?  Anyone should be able to right click on the table on the server and choose export to Excel.

haneeshmarella
Creator II
Creator II
Author

It's not possible through script editor? without having to use macros?

Nicole-Smith

The only thing possible through script editor is the STORE INTO or you can execute a macro (not sure if a macro for exporting a pivot table would work in the script editor though).  You may want to ask your question in a new thread.

haneeshmarella
Creator II
Creator II
Author

Thank you for your responses Nicole.