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

Creating a table with 2 date dimensions.

Hi,

 

I have 2 Main Tables Loaded into my Qlik App

 

Table 1: 

IDSTART_DATEEND_DATETab1_Value
111/10/202112/10/202110
211/10/202113/10/202110
311/10/202114/10/202110
412/10/202114/10/202110

 

Table 2 (Targets type file): 

Weekending (Fridays)Tab2_ValueCumulative
15/10/20211005000

 

I want to Link these 2 tables in table within the App itself to have an output of the following in a Pivot table. The SUM(Tab1_Value) is based off WEEKEND(END_DATE,0,5). 

WeekendingSUM(Tab1_VALUE)Tab2_Value
15/10/202140100
..  

 

I have been able to create a simple table using the Table2 as this is a very straight table, however I need to aggregate Table 1 to link with the weekending dimension? Picture attached of my current output. As you can see all the Tab1_Values are missing. 

peachman_0-1634038189649.png

 

I have tried to use an AGGR() Function - however this yields blank? is there anyway to get table 1 and table 2 to appear on the same table in qlik based on the weekending as described above?? 

Labels (2)
1 Reply
chrismarlow
Specialist II
Specialist II

Hi,

I think you need to force association within the script, so maybe something similar to this;

[table 1]:
Load * inline [
ID,	START_DATE,	END_DATE,	Tab1_Value
1,	11/10/2021,	12/10/2021,	10
2,	11/10/2021,	13/10/2021,	10
3,	11/10/2021,	14/10/2021,	10
4,	12/10/2021,	14/10/2021,	10
];

[Table 2]:
load *,
	[Weekending (Fridays)] AS [END_DATE];
load * inline [
Weekending (Fridays),	Tab2_Value,	Cumulative
15/10/2021,	100,	5000
];

  

Then you can use END_DATE in a calculated dimension;

20211012_1.png

Cheers,

Chris.