Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
panipat1990
Creator II
Creator II

TO MAKE ONE COMMON DATE

Dear Team,

i stuck a requirement.i have one table where two date's fields. i want to make them a common date.How is possible.kindly help me for resolving this issue.for this i am sharing data.

In data two field delviery date and doc date. i want to make them one field this is common date(Link Date)

1 Solution

Accepted Solutions
MarcoWedel

Glad you liked it.

Please close your thread if your question is answered:

Qlik Community Tip: Marking Replies as Correct or Helpful


thanks


regards


Marco

View solution in original post

22 Replies
el_aprendiz111
Specialist
Specialist

Hi

LOAD

Date(Date#(KeepChar([Doc. Date],'0123456789'), 'DDMMYYYY'),'DD/MM/YYYY')AS [Doc. Date],
Date(Date#(KeepChar([Del. Date],'0123456789'), 'DDMMYYYY'),'DD/MM/YYYY')AS [Del. Date],
Purch.Doc.,
Article,
PGr,
Item,
[Net price],
Quantity,
[Net Value],
[GR Qty]
FROM
[..\..\..\..\..\..\..\..\..\Documents\Downloads\Sale.txt]
(
txt, codepage is 1252, embedded labels, delimiter is '\t', msq);


panipat1990
Creator II
Creator II
Author

Hi

I want to make them these two date's as a common date

vishsaggi
Champion III
Champion III

What you mean by common date here? You have DocDate and DelDate having different dates, you want to make DocDate and DelDate have same dates as DocDate or IF you want to combine two dates as One single column which field date should be displayed? 

el_aprendiz111
Specialist
Specialist

Hi,

LOAD Date(Date#(KeepChar([Doc. Date],'0123456789'), 'DDMMYYYY'),'DD/MM/YYYY')AS [common date],
Purch.Doc.,
Article,
PGr,
Item,
[Net price],
Quantity,
[Net Value],
[GR Qty]
FROM
[..\..\..\..\..\..\..\..\..\Documents\Downloads\Sale.txt]
(
txt, codepage is 1252, embedded labels, delimiter is '\t', msq);



LOAD Date(Date#(KeepChar([Del. Date],'0123456789'), 'DDMMYYYY'),'DD/MM/YYYY')AS [common date],
Purch.Doc.,
Article,
PGr,
Item,
[Net price],
Quantity,
[Net Value],
[GR Qty]
FROM
[..\..\..\..\..\..\..\..\..\Documents\Downloads\Sale.txt]
(
txt, codepage is 1252, embedded labels, delimiter is '\t', msq);

EXIT Script;

panipat1990
Creator II
Creator II
Author

Actually i done this way but i want to do another way for solving. suppose my qvd size 3gb.if i concatenate above same.then size increase.this is not optimize way .kindly guide me another way for solving

panipat1990
Creator II
Creator II
Author

I want to make one common field common date

vishsaggi
Champion III
Champion III

What dates needs to be in your CommonDate field?

el_aprendiz111
Specialist
Specialist

Hi,

TMP:
LOAD
Date(Date#(KeepChar([Doc. Date],'0123456789'), 'DDMMYYYY'),'DD/MM/YYYY')AS [common date],
Purch.Doc.,
Article,
PGr,
Item,
[Net price],
Quantity,
[Net Value],
[GR Qty]
FROM
[..\..\..\..\..\..\..\..\..\Documents\Downloads\Sale.txt]
(
txt, codepage is 1252, embedded labels, delimiter is '\t', msq);



LOAD Date(Date#(KeepChar([Del. Date],'0123456789'), 'DDMMYYYY'),'DD/MM/YYYY')AS [common date],
Purch.Doc.,
Article,
PGr,
Item,
[Net price],
Quantity,
[Net Value],
[GR Qty]
FROM
[..\..\..\..\..\..\..\..\..\Documents\Downloads\Sale.txt]
(
txt, codepage is 1252, embedded labels, delimiter is '\t', msq);


NoConcatenate


SALES:
LOAD
[common date],
Purch.Doc.,
Article,
PGr,
Item,      
sum([Net price]) AS [Net price],
SUM(Quantity)    AS Quantity,
SUM([Net Value]) AS [Net Value],
SUM([GR Qty])    AS [GR Qty]
Resident TMP
Group BY
[common date],
Purch.Doc.,
Article,
PGr,
Item
;

DROP Table TMP;
EXIT Script;

panipat1990
Creator II
Creator II
Author

Dear Sir,

Kindly tell me how to identified this is document date and this del date From Common date.