Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mansi_dv
Contributor
Contributor

Appending Date

I have an excel document from which I load my data. But the excel sheet has contents as below:

Document Name:

Execution Date:

Execution Time:

:

:

:

etcetra

and then I have the actual data wihich I want to load.

Now, I remove all the above data in the [File Wizard: Type] and keep only the table. But the issue is, I want to append the year, Quarter and month from the above mentioned date in my script. Is it possible?

17 Replies
jsingh71
Partner - Specialist
Partner - Specialist

Can You share some sample data?

MK_QSL
MVP
MVP

Can you load your sample file?

Not applicable

Hi,

Can you post the excel file with sample data..

sundarakumar
Specialist II
Specialist II

Try adding

month(execution date) as month,

Q&ceil(month(execution date)/3) as quarter

To the code. this may help.. pls post sample..

Not applicable

You could load the full file and then split the Data with resident load.

Example:

FULL_DATA:

LOAD

A,

B,

C

FROM ...

;

META_DATA:

LOAD

B as DocumentName

Resident FULL_DATA

where A = 'Document Name:'

;

DATA

LOAD

A as ColumnA

Resident FULL_DATA

where A <> 'Document Name:'

its_anandrjs
Champion III
Champion III

Hi,

Please share any date if possible other wise do this as you say you want to load year, Quarter and month from above table so do some thing like

Load

Yourdate_Field,

Year(Yourdate_Field) as Year,

Month(Yourdate_Field) as Month,

'Q'&Ceil(Yourdate_Field/3) as Quarter

from Table;

and link this table with above table not need to join.

Hope this helps

Thanks & Regards

its_anandrjs
Champion III
Champion III

Hi,

You can do this in your existing table also add this code only

Yourdate_Field,

Year(Yourdate_Field) as Year,

Month(Yourdate_Field) as Month,

'Q'&Ceil(Yourdate_Field/3) as Quarter

Hope this helps

Thanks & Regards

mansi_dv
Contributor
Contributor
Author

The Sample file is attached.

mansi_dv
Contributor
Contributor
Author

I hope the issue is understood correctly..