Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

New Field created but not populating with value

Hello:

I am very new to Qlik and data visualization is not my background but I am trying to learn more.

I have a field called ArrivalDateTime which is in the format mm/dd/yyyy hh:mm:ss.

I want to create a new Field, YesterdayArrivalDateTime, which only populates a value if the ArrivalDateTime has a date of yesterday.

The app and its data are on a daily refresh.

I tried putting the following in the Data Load Editor:

If(floor(ArrivalDateTime=Today()-1), ArrivalDateTime) as [YesterdayArrivalDateTime];

The  code loads, and there is a new field called YesterdayArrivalDateTime, but all of it is null, even for data where the arrival date was yesterday.

I have a feeling I am missing something in the line of code but am not sure, could you give any pointers?

Thanks in advance!

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

You might try:

If(floor(ArrivalDateTime)=Today()-1, ArrivalDateTime) as [YesterdayArrivalDateTime];


If that doesn't work, you might use num((floor(ArrivalDateTime))

View solution in original post

2 Replies
m_woolf
Master II
Master II

You might try:

If(floor(ArrivalDateTime)=Today()-1, ArrivalDateTime) as [YesterdayArrivalDateTime];


If that doesn't work, you might use num((floor(ArrivalDateTime))

Anonymous
Not applicable
Author

Thank you! The first option worked!