Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to load the with prior 7 days data by excluding today's data?

Hi All,

I want to load the file which has prior 7 days data ,but it should exclude today's data like(  load the data from "02/14/2017" to "02/21/2017") in qlikview script by using where clause.

Please see the attached screenshot which i have tried one of the method.

Can you suggest me any alternative way to achieve this scenario.

Thanks.

1 Solution

Accepted Solutions
neelamsaroha157
Specialist II
Specialist II

I guess this is one of the easiest way.

At max you can replace variables in your where clause with their definitions

Where [Snapshot Date] >=Date(Today()-7, 'MM/DD/YYYY') AND [Snapshot Date] < Date(Today(), 'MM/DD/YYYY')

View solution in original post

9 Replies
vishsaggi
Champion III
Champion III

What is the issue you are facing here? Or Is it working fine?

Anonymous
Not applicable
Author

Existing logic is working fine but i need any optimistic way to perform this logic with effectively.

Anil_Babu_Samineni

`How your data seems, You are just entering and showing Only Today() Data. How do we think how much data you have? Assume if you have 3 years data and you need to show in between of data i would go for MakeDate() function in qlikview

Or if you need to show Min and Max i will go >= Min(DateField) < Today() // We can use Max(DateFied) up on your intention

If you are thinking same way you need to achieve i think this is the best one scripting level

Or front end you may need Set Analysis to do this? I am not sure where were you

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

What u have written is good.

why do u want make it complicated

Anonymous
Not applicable
Author

How we can achieve this in simple way? Could you please tell me the easiest way to achieve this.

neelamsaroha157
Specialist II
Specialist II

I guess this is one of the easiest way.

At max you can replace variables in your where clause with their definitions

Where [Snapshot Date] >=Date(Today()-7, 'MM/DD/YYYY') AND [Snapshot Date] < Date(Today(), 'MM/DD/YYYY')

Anonymous
Not applicable
Author

Okay Neelam. Is that any impact will there for affecting performance while using the variables instead of direct function.

neelamsaroha157
Specialist II
Specialist II

I guess, there won't be any performance change.

But variables makes maintenance easy.

Anonymous
Not applicable
Author

Yes, that's why I put variables instead of putting direct variables. Any how thanks for the guidenace Neelam.