Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sttran
Contributor
Contributor

How to only load the data from months that both datasets are available?

Hi all,

I have 2 datasets, A and B. They are on different sections of the Data Load Editor. Both datasets have a field called Date that represents the first day of the month in which they have data that month.

Dataset A’s data is available from 1/1/2019 to 5/1/2024

Dataset B’s data is available from 5/1/2020 to 12/1/2023 

The data range of the Date field may change because the data is being cleaned in my company’s system so there may be occasions that the min and max months this month won’t be the same next month. Hope that makes sense. It won’t be the same every month. I want to see if there’s a way to only load or create a master item for the period that both datasets have data dynamically so that no matter which dataset, the min and max month of each will be the same. 

So from the example, I will expect the load editor and the master item to only load the period of 5/1/2020 to 12/1/2023. 

Thank you all!

2 Replies
marksouzacosta
Partner - Specialist
Partner - Specialist

Hi @Sttran,

It is very difficult to give you a precise answer without knowing your Load Script, especially in a case like this where there are so many solutions. Can you please share your Load Script with us?

I believe your solution will be around using Inner Joins or Min/Max and RangeMin/RangeMax.

Read more at Data Voyagers - datavoyagers.net
marcus_sommer

You may create an appropriate exists-table and using it as filter - maybe with something:

t: load distinct Date from A; inner join(t) load distinct Date from B;

A: load * from A where exists(Date);
B: load * from B where exists(Date);