Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am quite new to Qlik Sense so it would be great if
you could help me on this:
I have several tables that I load from a SQL database,
for one table I only want to load the last 3 months of the PODueDate (Format: 2/15/2021).
Thank you
Set vNumMonthsToLoad = 3;
Let vMonthsToLoad = date(addmonths(Today(), -$(vNumMonthsToLoad), 'M/D/YYYY'); //Today date - vNumMonthsToLoad
SQL Select
<fields>
From <db>
Where PODueDate >= '$(vMonthsToLoad )'
;
Great! Please mark appropriate post as the solution so thread can be closed.
Set vNumMonthsToLoad = 3;
Let vMonthsToLoad = date(addmonths(Today(), -$(vNumMonthsToLoad), 'M/D/YYYY'); //Today date - vNumMonthsToLoad
SQL Select
<fields>
From <db>
Where PODueDate >= '$(vMonthsToLoad )'
;
Thank you for your reply.
Just one more question, the data load editor does not show the table
that I want to edit. It shows only SET commands.
So I need to add the script of the table that I want to change first and put this afterwards?
You mean you have no script in your data load editor? Choose your data selection and click the Select data button. You can use the wizard to select your database/table and get the SQL instert script.
Looks like you have added tables using data manager, I don't use that often but I think you need to remove that specific table from data manager and add that manually in the script editor and use the method as explained by @stevejoyce
Thank you all for your help, I have unlocked the automatically generated script and added this code and it looks good
Great! Please mark appropriate post as the solution so thread can be closed.