Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

beck110979
Valued Contributor III

records with field: audit_time

Hi Folks,

i have q question: I have following records with field: AUDIT_TIME, and field: AUDIT_TIME does look like: 06.02.2018 18:18:57

test_Field, audit_time

1, 07.02.2018 18:18:57

2, 06.02.2018 18:18:55

3, 05.02.2018 07:18:15

my question is: how can i compare or select the only records that have been reloaded today or yesterday? can i use in scriptarea the function: Today () to see only new records (records that have been reloaded today) ?

for instance: i want to see only the record:

1, 07.02.2018 18:18:57 for today

or

2, 06.02.2018 18:18:55 for yesterday

Thanks a lot for any feedback and help

Beck

7 Replies
lironbaram
Honored Contributor II

Re: records with field: audit_time

hi

in your script you can calculate if a record is from today or yesterday

something like

load timestamp(timestamp#(audit_time,'DD.MM.YYYY hh:mm:ss')) as audit_time,

     test_Field,

     if(floor(timestamp(timestamp#(audit_time,'DD.MM.YYYY hh:mm:ss')))=today(),'Today',

      if(floor(timestamp(timestamp#(audit_time,'DD.MM.YYYY hh:mm:ss')))=today()-1,'Yesterday')) As DayFilter;


load * inline [

test_Field, audit_time

1, 07.02.2018 18:18:57

2, 06.02.2018 18:18:55

3, 05.02.2018 07:18:15

]

beck110979
Valued Contributor III

Re: records with field: audit_time

Hi Liron,

thanks a lot for your feedback, i tried but it does not work

lironbaram
Honored Contributor II

Re: records with field: audit_time

hi

attach is an app with sample data

you can see how it work

beck110979
Valued Contributor III

Re: records with field: audit_time

ok, i will do this now,  Liron i have one question, what is, if i want to compare my record on the base of field: audit_times, and namely i want compare : 07.02.2018 18:18: 57 with 07.02.2018 20:15:20

beck110979
Valued Contributor III

Re: records with field: audit_time

i see only today, and i am not able to see the records from yesterday or last days or years

lironbaram
Honored Contributor II

Re: records with field: audit_time

hi

not sure i understood your question , what do you want to compare ?

beck110979
Valued Contributor III

Re: records with field: audit_time

i want to compare my records on the base of field: AUDIT_TIME

i do reload my date 3 time a day:

for exampel:

1, 07.02.2018 07:15:20 Old

1, 07.02.2018 12:20:20 Old

1, 07.02.2018 14:15:20 New


i mean this situation,


sorry for my unclear explanation