Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fiscal

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

1 Solution

Accepted Solutions
Not applicable
Author

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;

View solution in original post

13 Replies
Not applicable
Author

when loading the script use the following, this sets your year to begin on the 7th month

yearname ( Date, 0, 7 ) as FiscalYear,

Not applicable
Author

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?

Not applicable
Author

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;

Not applicable
Author

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

Not applicable
Author

No problem, can you load the qv document or just post the load script of the table that contains the date field.

Not applicable
Author

Sorry but once again im not entirely sure what you mean.... the raw data with the dates contained is in a access database file and looks like this:

and it continues with thousands of records until December 2010.

Not applicable
Author

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;

Not applicable
Author

See attached example document

Not applicable
Author

i see. its:

LOAD BusinessEntityID,

TerritoryID,

StartDate,

EndDate;