Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Max Year to be linked to a table

Dear Qlikview user

I have obtained the Maximum Year in the load script by using a resident load

MinMaxDates:

Load

Max(Yearname(FactDate, 0, 4)) as MaxYear

Resident Table 1;

I now wish to link this MaxYear within Table2 in my script, so I can place a filter in the where clause and only retrieve the Max Year

I.e.  (Next Table)

main_data:

LOAD

Count,

Unique_ID,

data_source,

FactDate,

FactDateNum

Resident Table1

WHERE ???????????????

DROP Table1;

Could someone kindly advise on how I would achieve this?

Kind Regards

Helen

2 Replies
PrashantSangle

Hi,

use where exist() for details see in help menu

try like

Load * from table where exist(maxYear,comparingField);

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sunny_talwar

I guess to get the exact script, you might need this:

main_data:

LOAD Count,

     Unique_ID,

     data_source,

     FactDate,

     FactDateNum

Resident Table1

WHERE Exists(MaxYear, YearName(FactDate, 0, 4));

DROP Table1;

Alternatively, you can also do this:

Table1:

LOAD *,

          Year(FactDate) as FactYear

FROM Source;

Right Join (Table1)

LOAD Max(FactYear) as FactYear

Resident Table1;