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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
sifatnabil
Specialist
Specialist

Combining dates from 2 sources

Hi,

I have 2 unrelated tables with 1 common field, Date. However when selecting the dates in the listbox, the dates from the 2 tables are showing up separately, i.e. selecting 03/12/2014 selects the date for table 1 only. There is a duplicate 03/12/2014 linking to the other table. How can I combine the dates such that 1 date selection shows the data from both tables?

5 Replies
PrashantSangle

Hi,

In script use Floor()

try like

Date(Floor(YourDateField)) as NewDate

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
its_anandrjs
Champion III
Champion III

Hi,

Try to load the tables like below and create common date table

Tab1:

Load * From Source;

Tab2:

Load * From Source;

CommonDate:

Load

Date1,

Date1 as [Date field]

'Table1 Date' as TableFlag

Resident Tab1;

Concatenate(CommonDate)

Load

Date2,

Date2 as [Date field]

'Table2 Date' as TableFlag

Resident Tab2;

MasterCal:

Load

[Date field]

..

Regards

Anand

mato32188
Specialist
Specialist

Hi Sifat,

make sure your data fields are using same format. You can reach it by date(Field, 'DD/MM/YYYY') as %Date

Martin

ECG line chart is the most important visualization in your life.
sifatnabil
Specialist
Specialist
Author

Thanks Anand and max dreamer I've created this Date island using the above and floor(Date), but now the Date format comes out as "DD/MM/YYYY hh:mm:ss" - how can I get rid of the hh:mm:ss when using floor? It didn't remove the timestamp despite using date(floor(DealTime),'DD/MM/YYYY') as DealTime

PrashantSangle

Hi,

use date#() of Subfield() to remove timestamp

try like

Date(Date#(Subfield(DealTime,' '),'DD/MM/YYYY'),'DD/MM/YYYY') as datefield

Note : Use Date#() if needed

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂