I think a better solution may be to use the WeekYear() function.
will return 2011.
I only know about this because I made the same mistake in the Qlikview Components calendar and someone sent me a correction.
So in my case I am doing master calander where fiscal starts from sep to Aug. I have alligned quarters accordingly for inline. How do I make changes to fiscal year.
MAPPING LOAD * Inline [
What should be the change to below code:
If (Month(TempDate) = 12, Year(TempDate) + 1, Year(TempDate)) as FiscalYear,
Should it be adjusted to.below?
If (Month(TempDate) = 12, Year(TempDate) + 8, Year(TempDate)) as FiscalYear,
Do I need to make any other change for my Calander to function.
My recommendation is to use the AddMonth Function.
Year(AddMonth(TempDate,3)) as FiscalYear
This will take a date in Sept 2012 and return 2013. If you wish you can add this line to the script for the MasterCalendar table and retain the line that just has the calendar year so you will be able to filter on Fiscal Year and/or Calendar Year.
You may also want to add line for the fiscal month number but I would also retain the calendar month. This will enable you to sort or the Month field in the correct fiscal order (i.e. sept first)
Month(TempDate) As Month,
Num(Month(AddMonth(TempDate,3))) as FiscalMonthNumber,
You can use below code, for getting quarters with differant months.
We can change order of months and quarters in the way we needed.
mapping Load * inline [month,Quarter
Hi I am truing to implement the master calendar but I have to load data from two tables in an access file one containing dates from 2011 and the other from 2012.
I use the following code, but I only get the 2011 data to apear, what should I change?
ODBC CONNECT32 TO [MS Access Database;DBQ=C:\Users\t42386\Documents\GR Data\ Pick Detail 2011-12.accdb];
SQL SELECT *
FROM ` Pick Detail 2011`;
SQL SELECT *
FROM `Pick Detail 2012`;
If you load two tables into QV that have exactly the same fields in them, then QV will automatically concatenate the tables together. The 2012 and the 2011 data will be in the same table. From there you should be good to follow the example.
Sent from my Commodore 64