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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ajater2012
Contributor
Contributor

use oracle queries in qlik sense that use multiple date fields

 


I made some applications with qlik sense with single date field but now I have these two queries each one has date field and I want to know how I can use them as one deamnsion for searching:

 

Labels (1)
1 Reply
agni_gold
Specialist III
Specialist III

You can create link table like below : 

 

Query 1:
SELECT D.GL_ACCT#,D.TRANS_DATE,SUM(NVL(D.DEB_AMT,0)) - SUM(NVL(D.CRE_AMT,0)) BAL
FROM GL_TRIAL_BAL D, TRANS_TYPES C
WHERE C.TRANS_TYPE = D.TRANS_TYPE
AND D.TRANS_DATE BETWEEN :FROM_DATE and :TO_DATE
GROUP BY D.GL_ACCT#;

 

Query 2:
SELECT D.VCHR_ACCT#,D.VCHR_DATE,
SUM(NVL(D.VCHR_AMT,0)) CRD_AMT
FROM CASH_FLO_HDR D
WHERE D.VCHR_STS = 1
AND D.VCHR_DATE BETWEEN :FROM_DATE and :TO_DATE
GROUP BY D.VCHR_ACCT#;

 

Link:

Load Distinct [VCHR_ACCT#],[VCHR_DATE]. as DATE Resident Query 2;

concatenate

Load Distinct [GL_ACCT#], TRANS_DATE as DATE Resident Query 1;

 

Make sure the format of dates from source should be the same for both the queries or you can convert it into Link table.