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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

today()-3

Hi all,

Example that today is Oct 18th, however in our database, it takes three days to completely capture all the data as some late entry of the data still have not capture, thus we gives a three days buffer to get the full set of data.

As per this scenario, the complete set of data is 15th as it is today()-3

However there are still some data exist on 16th and 17th even though it is not a complete set. Is there any code in QV that tells them to capture data till 15th and ignore 16,17 data.

Thanks

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III


Hi,

You can do this in a better way like this also

Create a variable

vDateRange = Date(Today() -3)

=Sum({<DateFieldName ={'<=$(=vDateRange)'}>} MeasureName)

Hope this helps you.

Regards,

Jagan.

View solution in original post

9 Replies
v_iyyappan
Specialist
Specialist

Hi,

Try like this

Load

     *

From tablename

Where datefield <= (Today() - 3);

please check the dateformat in datefield.

regards,

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try filtering the data from the table by using the following where condition

Data:

Load

     *

From DataSource

Where DateDimension <= Date(Today() - 3);

If filtering is not working then check the date formats of DateDimension and Today() are same.

Regards,

Jagan.

n1ef5ng1
Creator
Creator
Author

Possible to not touch the script? Possible to make these on dimension or expression?

jagan
Partner - Champion III
Partner - Champion III

Hi,

Then try like this in all your expresions

=Sum({<DateFieldName ={'<=$(=Date(Today()-3))'}>} MeasureName)

Hope this helps you.

Regards,

Jagan.

jagan
Partner - Champion III
Partner - Champion III


Hi,

You can do this in a better way like this also

Create a variable

vDateRange = Date(Today() -3)

=Sum({<DateFieldName ={'<=$(=vDateRange)'}>} MeasureName)

Hope this helps you.

Regards,

Jagan.

senpradip007
Specialist III
Specialist III

Hi,

Try this

Data:

Load

*

from <Table Name>

where <DataField> <= Date(Today() - 3);

saumyashah90
Specialist
Specialist

hey you can try this in expression

=Date(Today()-3,'DD-MM-YYYY')

er_mohit
Master II
Master II

Make a variable vMaxDate=Date(Today() -3)

and Go to document properties --> In document event trigger-->on open -->add action

click on add->select in field--> Write fieldname like Date

and in string write

=vMaxDate

then sav it ok

close the application then reopen it your Data will be shown less than today date - 3

hope it helps

tresesco
MVP
MVP

May be like attached sample?