Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Load * From Your Tablename where [Fiscal Year] = Year(Today()) and [Fiscal Month] = Month(Today())
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;
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.
custid | fiscalmonth | fiscalyear |
cid1 | jun | 2015 |
cid2 | aug | 2015 |
cid3 | july | 2015 |
cid4 | sep | 2014 |
cid5 | oct | 2014 |
cid6 | jan | 2014 |
cid7 | feb | 2014 |
cid8 | mar | 2014 |
cid9 | apr | 2015 |
cid10 | may | 2015 |
cid11 | jan | 2013 |
cid12 | feb | 2013 |
can u upload the document?
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