Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter the records

Hi All ,

I Have two tables with CustomerId in one table  and fiscalmonth ,fiscal year in another table, now i want to filter the records which are in current fiscalmonth and current fiscal year ,the expression should be in load script.

Please help me.

Thanks.

Labels (1)
5 Replies
MK_QSL
MVP
MVP

Load * From Your Tablename where [Fiscal Year] = Year(Today()) and [Fiscal Month] = Month(Today())

tresB
Champion III
Champion III

If cutomerid is there in both the tables, you can join the tables on that key and then apply the filter like:

JoinedTab:

Load

     CustomerID, Otherfields From <table1>;

Left/Right Join

Load

     CustomerID, FiscalYear, FiscalMonth from <>table2;

NoConcatenate

Final:

Load

     * Resident JoinedTab Where FiscalYear=Year(Today()) and FiscalMonth= Month(Today());

Drop Table JoinedTab;

Not applicable
Author

Thanks Manish & tresesco

my fiscal year is like the below , as per my requirement  i need cid2  record only now like wise next month the ids which are in sept i need those records.

custidfiscalmonthfiscalyear
cid1jun2015
cid2aug2015
cid3july2015
cid4sep2014
cid5oct2014
cid6jan2014
cid7feb2014
cid8mar2014
cid9apr2015
cid10may2015
cid11jan2013
cid12feb2013
Not applicable
Author

can u upload the document?

Anonymous
Not applicable
Author

Hi John,

Load * from table2 where FiscalYear=Year(Today()) and FiscalMonth= Month(Today())

inner join

load custid from table1.

example with sample values:

FISC:

Load * Inline

[custid,fiscalmonth,fiscalyear

cid1,jun,2015

cid2,aug,2014

cid3,july,2015

] Where fiscalyear =year(today()) and MonthName(today());

inner join

load * inline

[custid

cid1

cid2

cid3];

Regards,

Chinna