# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New Contributor

## Comparing QVD Dates using Set Analysis

Hi,

Is there a technique to use set analysis to compare dates - loaded from QVD files?

I load the QVD data using the following script:

filename() as FileName,

date(date#(mid(filename(), 12, 10), 'DD-MM-YYYY'), 'DD-MM-YYYY') as OrderDate,

**

FROM

[...Qlik Historic\Bookmaster_*.QVD]

(qvd);

My first formula I wrote is: sum({\$<OrderDate={"04-05-2018"}>}[Loan Value(USD)]) - this is not working

Ideally I want to get to a point where the date is 'Today()-7' so that the data constantly rolls everyday.

Is this feasible?

Tags (3)
1 Solution

Accepted Solutions
Highlighted
Honored Contributor III

## Re: Comparing QVD Dates using Set Analysis

{"\$(=Date(Today()-5,'DD/MM/YYYY'))"}

3 Replies
Highlighted
Honored Contributor III

## Re: Comparing QVD Dates using Set Analysis

May be try

sum({\$<OrderDate={"\$(=MakeDate(2018,5,4))"}>}[Loan Value(USD)])

what format of date do you see if you put OrderDate Field in a list box? number? or text

Highlighted
New Contributor

## Re: Comparing QVD Dates using Set Analysis

Hi Sasidhar,

That is great and has rectified my first set analysis question!
The OrderDate field is DD/MM/YYYY - which now explains why my original formula was not working with DD-MM-YYYY!

Do you know of a method of not specifying a date but adding "today()-5" for example?

Highlighted
Honored Contributor III

## Re: Comparing QVD Dates using Set Analysis

{"\$(=Date(Today()-5,'DD/MM/YYYY'))"}