Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to develop an application in which there is a time dimention with Time_date and time_id fields..
I want to load/schedule my application in such a manner, it has previous day data avaliable...
Means how to get the previous day data and aply the filter....
Thanks..
Hi,
Do you mean to say your application should have only Pre. Day data. or do you mean you need pre. and today data too.
And what filters you are applying and on what.
Please describe in more details.
Regards,
Kaushik Solanki
I think you want to show the comparison between the current date and previous date data in a chart may be a straight table or a barchart.
U can write that code if you have a date field in ur table structure.And Date must be in proper Date field,not in string actually...
Current Date Data:--sum({$<Date={$(=Max(Date))}>} Sales)
Prev. Date Data:--sum({$<Date={$(=Max(Date)-1)}>} Sales)
Try and reply me.
Thanks and regards,
Koushik.
@ Kaushik,
The application should contain only previous day data.....I have Time_date field in ' 01-Jan-2011' format...and i need to schedule it every day to refresh the previous day data...
Thanks
Hi,
You can try this.
Load Field1,
Field2,
Time_Date
from xyz where Time_Date = date(today()-1,'DD-MMM-YYYY');
Regards,
Kaushik Solanki
@ Kaushik
it is giving error
SQL error: ORA-00936: missing expression
ORA-00936: missing expression
Script line: SELECT * FROM "DW_OWNER"."TIME_DIM" WHERE TIME_DATE=Date(Today()-1,'DD-MMM-YYYY')
SQL SELECT *
FROM "DW_OWNER"."TIME_DIM"
WHERE TIME_DATE=Date(Today()-1,'DD-MMM-YYYY')
Ohh no,I told you the expression of qlikview to show data not to load data.I am sorry sushil.
U can load all data by select *from (Table name).
and when u r going to represent the comparison chart then put that expressions.
Got It.
Thanks.
Koushik.
Hi,
If you are using this in SQL statement then instead of Date function you sould use below function.
Where Time_Date = To_Date(Today()-1,'DD-MMM-YYYY')
Regards,
Kaushik Solanki
Hi Koushik Roy,
Thanks for your opinion....
But i need to load only last day data becaz data size is huge...and store that previous day data in qvd file for further use in applications.....
i have written script as:
Time:
LOAD "TIME_ID",
"TIME_DATE",
"DAY_OF_MONTH",
"WEEK_OF_YEAR",
"WEEK_STARTING_DATE",
"MONTH_OF_YEAR",
"MONTH_NAME",
QUARTER,
"YEAR_OF_YEAR",
"HALF_YEAR";
SQL SELECT *
FROM "DW_OWNER"."TIME_DIM"
WHERE TIME_DATE=Date(Today()-1,'DD-MM-YYYY');
it is giving error as described above