Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Need a logic for this date data?

Hi Folks,

I have the data from 01/01/2014 to 12/31/2014. here i want to exclude some dates as per my logic.I tried some couple of things but i didnt get any proper output.

I have attached the excel here.i need all the data except of exclude dates.here i want to exclude all the data which is haing less than Flag.

for example i have a LESS THAN flag and it is having the date -7/17/14

i want to exclude all the dates from 01/01/2014 to 07/17/14. i need a data from 07/18/2014.

Plz suggest me with the logic on this.


6 Replies
Highlighted
Champion
Champion

Hi,

seems easy: If you have that LESS THAN flag with the timerange to exclude, that means the date in that flag_field is actually your start_date, so you have to replace 1/1/year with that date.

You can first load your full data_table, then load that comparison_table, then join the two on a suitable field and if you get a LESS THAN date from that comparison_table, then use that, otherwise use 01/01/year as your start_date - you can generate a third field to calculate that.

HTH

Highlighted
Not applicable

Thanks DataNibbler,

But here i have two dates with two LESS THAN flag values.when i am trying it is taking only one date range only.

i am using it use of for loop.

Highlighted
Specialist II
Specialist II

You could createa table containing all the dates you want to non include to your data model and use the exists function in your load statement:

Lets say you have a table with all the dates to exclude in a field named Date.

Then, load your fact table:

Fact:

Load * from FactTable

where not exists(Date,Date);

Regards,

Jose

Highlighted
Not applicable

Hi,

I have dates table that is having 01/01/2014 to 12/31/2014.

i need the list of exclude dates.Plz send me the logic code for this scenario.

Highlighted

Hi,

Check if this helps

Calculating Holidays in script

Regards

ASHFAQ

Highlighted
Partner
Partner

Hi Rakesh,

Use the below logic.

LOAD
[Date Exclude]as Dates

FROM
[..\Data\Date range.xlsx]
(ooxml, embedded labels, table is Sheet1)
where wildmatch(Flag, 'Less than');

noconcatenate

Date:
LOAD Dates
FROM
[..\Data\Dates 1-12.xlsx]
(ooxml, embedded labels, table is Sheet1)
where not exists(Dates);

drop table DateRange;

Hope it helps.

Regards,

Sindu