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

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
sakshikaul
Creator II
Creator II

Inline tables functionality

Hi

I have to maintain an internal table in qlik view in which I have to compare last year date for Diwali with current Year date for Diwali. Following is the data to be maintained in inline table

LastDate      currentDate                event

12/10/2017   22/10/2018                 diwali

22/11/2017    12/10/2018                durga pooja

so, I have maintained following above table in inline table and also

I have derived lastDate and CurrentDate from  (circled in black color)

Date#(CreateDate, 'YYYYMMDD') as Sold_Date,
date(Date#(CreateDate, 'YYYYMMDD')) as lastDate,
date(Date#( CreateDate, 'YYYYMMDD')) as CurrentDate,

Following is the data model for the above

paint.png

Below is the image in which date for inline table is not correct ie I am getting 10/21/4670 instead of 10/21/2017

so how to make it correct?



paint.png

can we apply date function in inline table in qlikview?

Labels (1)
10 Replies
sunny_talwar
MVP
MVP

sakshikaul
Creator II
Creator II
Author

Hi

I want to make a composite key so for that I am writing following code for inline table

Inlinetable:

LOAD

Date(Date#( lastDate,'DD/MM/YYYY'),'YYYMMDD') &

Date(Date#(CurrentDate, 'DD/MM/YYYY'), 'YYYMMDD') as EventKey,

Event

INLINE [​

lastDate,CurrentDate, Event​

10/12/2017, 12/10/2018, Durga pooja​

11/10/2017, 10/10/2018, Diwali​

]
;​
but its giving me error

PAINT2.png

lastDate field do exist in my script

LOAD SAPCode,
[inv no],
Sold_Date,
lastDate,
CurrentDate,
Date(lastDate, 'YYYMMDD') & Date(CurrentDate, 'YYYMMDD') as EventKey,
Sold_Month,
Sold_Year,
ItemNumber,
[Season Code],
COLOR,
Material,
quantity_sold,
[sales price],
[inv value],
[Inv val Bucket],
[tax amount]
FROM
[..\QVD\transform_qvd\IncrementSales_full.qvd]
(
qvd);


Please help in  solving  the issue








Anil_Babu_Samineni
MVP
MVP

Script is not mandatory, check field name in QVD whether it has or not. Can you load QVD alone and test

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar
MVP
MVP

I think you might have missed a semi-colon here

Inlinetable:

LOAD

Date(Date#( lastDate,'DD/MM/YYYY'),'YYYMMDD') &

Date(Date#(CurrentDate, 'DD/MM/YYYY'), 'YYYMMDD') as EventKey,

Event;

INLINE [

lastDate,CurrentDate, Event

10/12/2017, 12/10/2018, Durga pooja

11/10/2017, 10/10/2018, Diwali

];

sakshikaul
Creator II
Creator II
Author

this semicolon after event is giving an error

PAINT2.png

sunny_talwar
MVP
MVP

Oops my bad, would you be able to share the log file to show the issue?

sunny_talwar
MVP
MVP

I tried this and it ran without any trouble

LOAD Date(Date#(lastDate,'DD/MM/YYYY'),'YYYMMDD') & Date(Date#(CurrentDate, 'DD/MM/YYYY'), 'YYYMMDD') as EventKey,

Event

INLINE [

    lastDate, CurrentDate, Event

    10/12/2017, 12/10/2018, Durga pooja

    11/10/2017, 10/10/2018, Diwali

];

maheshkuttappa
Creator II
Creator II

Include "Load * " before Inline

LOAD Date(Date#(lastDate,'DD/MM/YYYY'),'YYYMMDD') & Date(Date#(CurrentDate, 'DD/MM/YYYY'), 'YYYMMDD') as EventKey,

Event;

LOAD * INLINE [

    lastDate, CurrentDate, Event

    10/12/2017, 12/10/2018, Durga pooja

    11/10/2017, 10/10/2018, Diwali

];

sakshikaul
Creator II
Creator II
Author

after reloading the data I am not getting  any values for eventKey in inline table

PAINT2.png