Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey guys
I got a set of dates here but the customer would like it as a fiscal calender starting from 1July-30June. It needs to be set up as default for the whle document without using a calender object.
can anyone please instruct me on how to go about dong this?
Any help is much appreciated.
Thanks
So use the following script to make the startdate into fiscal year from Jul-Jun.....
LOAD
BusinessEntityID,
TerritoryID,
StartDate,
yearname (StartDate, 0, 7) as FiscalYear,
EndDate;
when loading the script use the following, this sets your year to begin on the 7th month
yearname ( Date, 0, 7 ) as FiscalYear,
My script starts like this:
SET ThousandSep=' ';
SET DecimalSep='.';
SET MoneyThousandSep=' ';
SET MoneyDecimalSep=',';
SET MoneyFormat='$ # ##0,00;$-# ##0,00';
SET TimeFormat='hh:mm:ss TT';
SET DateFormat='YYYY/MM/DD';
SET TimestampFormat='YYYY/MM/DD hh:mm:ss[.fff] TT';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
Now where must i put in what you said?
you can do one of the following
1.
When loading your table add the following script
LOAD
order_no,
order_date,
yearname (order_date, 0, 7 ) as FiscalYear,
customer,
etc... ;
SQL Select *
FROM TABLE Orders;
2.
What I do is create a seperate date table and link my orders table to this. This gives me greater flexibility when I want to manipulate dates
Date:
load
today()-recno()+1 as Date
autogenerate(today()-'2004-12-31');
DateParts:
load
Date as order_date,
Year(Date) as Year,
yearname ( Date, 0, 4 ) as FiscalYear,
weekstart(Date) as WeekStart,
Month(Date)&' - '&right(year(Date),2) as MonthYear,
Month(Date) as Month,
Day(Date) as Day,
Week(Date) as Week,
Weekday(Date) as WeekDay
resident Date;
drop table Date;
Im very sorry but i should mention i am extremely new to qlikview and i got no idea what ur talking about.
can you maybe explain a bit more in detail step by step?
Thanks so much
No problem, can you load the qv document or just post the load script of the table that contains the date field.
In the EDIT Script or LOAD script, can you show me the load script / code, not the end result e.g.
Select
order_no,
order_date,
customer
From table OrdersH;
See attached example document
i see. its:
LOAD BusinessEntityID,
TerritoryID,
StartDate,
EndDate;