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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue ? Urgent

I  Have 30 records, from 1-jan -2014  to 28-feb-2014.

but I want to retreive records which r present between 10-jan-2014 to 5-feb-2014,  how can i get those records ?

1. Using Set Analysis

2.  With out using Set Analysis

Thanks,

Helen

13 Replies
Not applicable
Author

Thanks Nitha..

Could you please give me an example related that...

Anonymous
Not applicable
Author

Implement for master calendar:

Let vMin = num(makedate(2014,01,10));
Let vMax = num(makedate(2014,02, 05));

Temp:
Load Date($(vMin) +RowNo() -1) as DATE
AutoGenerate 1
While Date($(vMin) +RowNo() -1) <Date($(vMax));

Master_cal:
Load DATE,
  Day(DATE) as DAY,
  if(Day(DATE) >=10,Month(AddMonths(DATE,1)), Month(DATE)) as MONTH,
  if(Day(DATE) >=10,Year(AddMonths(DATE,1)), Year(DATE))as YEAR
Resident Temp;

Drop table Temp;

linusblomberg
Creator II
Creator II

I think you need to specify what functionality you are looking for if we will be able to help. How to write the set analysis statement has been written and so on. Do you want for a user to choose a date and then see 6 months back?

I usually have a bunch of date variables defined to use in my set analysis expressions. For example

vMaxDate max(date)

vMaxDateLY addyears(vMaxDate,-1)

vDateR6 addmonths(vMaxDate,-6) and so on. You could add a monthstart in there to show complete months.

Hope this helps

Not applicable
Author

Thanks Nitha,

I am asking for last 6 months & last to last 6 Months...