Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

how to use set analysis for creating a date range

I want to creat a flag with a date range(3/10/2011, 3/17/2011) using set analysis, Please help me

1 Solution

Accepted Solutions
Not applicable

how to use set analysis for creating a date range

Hi Pramod,

That you have to do in the backend.

For example say the Date field in your script is called Calendar,

// Back End Situation

Temp:

Load *,

if(Date(Calendar)>='03/10/2011' and Date(Calendar)<='03/17/2011', 'Flag', 'No Flag') as DATE_FLAG

;

and then reload you will get a flag field in your data model, which you can utilize.

Now, if those selected dates are to be variable, then you will need to define more what exactly is your situation.

Also, I haven't have knowledge if Set Analysis works in Backend.

// In front end i am not ready yet to answer this question.

Because as per my knowledge, set analysis does aggregation function, so how can it set flags for a date range is what I would also be interested in learning.

Hope this helps,

Bikash Debnath

5 Replies
Not applicable

how to use set analysis for creating a date range

Hi Pramod,

That you have to do in the backend.

For example say the Date field in your script is called Calendar,

// Back End Situation

Temp:

Load *,

if(Date(Calendar)>='03/10/2011' and Date(Calendar)<='03/17/2011', 'Flag', 'No Flag') as DATE_FLAG

;

and then reload you will get a flag field in your data model, which you can utilize.

Now, if those selected dates are to be variable, then you will need to define more what exactly is your situation.

Also, I haven't have knowledge if Set Analysis works in Backend.

// In front end i am not ready yet to answer this question.

Because as per my knowledge, set analysis does aggregation function, so how can it set flags for a date range is what I would also be interested in learning.

Hope this helps,

Bikash Debnath

Not applicable

how to use set analysis for creating a date range

tq Bikash,

instead of if, I need to use set analysis in the front end for creating a column, if the date is in range then we need to give value ' 1' else 'o'

Not applicable

how to use set analysis for creating a date range

It can be very easily done with if...else statement, as you will need to compare all the records in your database.

Not applicable

how to use set analysis for creating a date range

yea it can be done with if condition but I have some more things to add to that expression, so I need to use set analysis

Not applicable

how to use set analysis for creating a date range

Hi Pramod,

if you could specify what more conditions do you need to add, then we can think of something.

But creating a flag is a RAM consuming process, so it will be better if you do it in Backend. But backend will support  if...else statement.

Regards,

Bikash

Community Browser