Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends,we are getting data in .text files from 3 sources
There is no date filled to do incremental load .Luckily we have Accounting period column in all .text files,Accounting period has dates in irregular formats, my basic requirement is to display only 12 months of data in app.
Source A-->abc2014.qvd(12 months) let say it has jan-14 jan-15 data after 12 months a separate data has to load in separate qvd say abc2015.qvd
Source B-->def2014.qvd(12 months)
Source C-->ghi2014.qvd(12 months)
While using QVD in Final application it should display Today()-12 i.e.,past 12 months from present .
can any one suggest in detail how to do this process dynamic way to do whole process
Let say today i see data in Application -Nov-2014
Need to see NOV-2013 -Nov-2014 data
You can try with
TableName:
Load
*
From Location
Where [Accounting period] = Date( AddMonths( Today( ), -12) ,'MMM-YYYY');
Store TableName into TableName.qvd;
Regards
Anand
Hi,
TableName:
Load
*
From Location
Where Date>= Date( AddMonths( Today( ), -12) ,'MM-YYYY');
Store TableName into TableName.qvd;
Coming to the front end use the set analysis
like this you can try
let vDate= Today();
let vDate2= addmonths(today(),-12)
=sum({<date={'=<$(vDate) >=$(vDate2)'}>} Sales)
OR
=sum({<date={'=<($(vDate)) >=($(vDate2))'}>} Sales)
Hi Swetha,
You can try this way
Source:
LOAD *,
[Accounting period]
From Location; //Which is from all data
Last12Months:
LOAD
Last12 as Newflag,
[Accounting period]
Resident Final
Where [Accounting period] >= Date( AddMonths( Today( ), -12) ,'MMM-YYYY') And
[Accounting period] <= Date( Today(),'MMM-YYYY');
Store Last12Months into Last12Months.qvd;
Regards
Anand
Thanx for your solution Anand can you please suggest to maintain qvd in dynamic naming convention
we have 3 sources all are text files,Assuming every day we get data as there is no date Fields no increment load in Application.we are making one composite key by Account Period and Report Office as Key,[resent approach we are concatenate to previous months].Can you guide to make more dynamic way to represent naming conventions and variables to Account Period