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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Sara_3
Creator II
Creator II

Compare values from the same field using filter and without filter.

Hi all,

Requirement :

I need 2 date fields from Load Date in script . 

1- Load Date with selected Document and ID ( 3 dates above) - Table 2

2- Load Date without Selection (all data set of Load Date) (all 6 Dates) -  Table 1

 

Test1:

load 

Document, ID, Load Date

from QVD;

Table1:

Document ID  Load Date 
123 1 12/3/2021
123 1 10/4/2021
123 1 9/28/2021
456 1 6/23/2020
456 3 11/6/2021
456 3 1/5/2020

 

for example; When I selected the Document 123 and ID 1 I got this data:

Table 2 :

Document ID  Load Date 
123 1 12/3/2021
123 1 10/4/2021
123 1 9/28/2021

 

I tried multiple things but did not worked , Please help me this.

Thanks in advance.

13 Replies
Sara_3
Creator II
Creator II
Author

Thanks Aditya, I will try this and let you know . I really appreciated!

Sara.

Sara_3
Creator II
Creator II
Author

Hi Aditya,

It is working for Document 123 and Item 1 but not for others because I think we are using Addmonth. the Load Date is not specifically every month it is  random load dates  like; 1 day apart, 2 days apart or week apart etc.

is it possible we can create a temp table with field all Load dates (all not selected)then we compare the Load Dates (selected)?

 

Thanks,

Sara.

 

Aditya_Chitale
Specialist
Specialist

You cannot generate table at script level by making selections on frontend. That's how it works. As for generating table with "all not selected" dates, I gave you 2 solutions. 

According to you, dates could be 1 day, 2 days, 1 week apart etc. Hence my question was the same from the beginning that what factor you are considering to compare previous date ? Are you comparing it on previous month level, week level or day level ? 

 

Regards,

Aditya

Sara_3
Creator II
Creator II
Author

Hi Aditya, 

that is the problem the load Date is random , it is not month level , week level or day level.

as you see the load Date is random , for Document 456 and ID 3 . the data is load on 11/6/2021 and 1/5/2020.

 

Document ID  Load Date 
123 1 12/3/2021
123 1 10/4/2021
123 1 9/28/2021
456 1 6/23/2020
456 3 11/6/2021
456 3 1/5/2020

 

Thanks,

Sara.