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

Urgent : Single Calender link for two different Databases (tables)

Hi Folks,

I have two different Databases (DB1 & DB2) which gets linked using one key (ApplicationNo).

In DB1 there is one date field (SubmittedDate) which is the main date field in DB1 so I created a calender using this SubmittedDate.

But if I select "2014 or 2013..." then there is no data in DB2 because It may be possible that in 2014 they have entries for 2010 or 2011 so can any one tell how to approach for this scenario?

How to link Calender to date fields for both databases.

Thanks...

Regards,

Yojas

1 Solution

Accepted Solutions
Not applicable
Author

Hi All,

I got one solution for it...

I'll concatenate DB1 & DB2 on the basis of App# and Date then i'll create calender link on the basis of that date field.

And to separate data I am going to use Flags ..

Still you can suggest if You think there is any other possible ways of doing it...

Thanks ....

Regards,

Yojas

View solution in original post

8 Replies
phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

assuming your data is like this ...

DB1:

App#, SubmittedDate

1, 2013

2,2012

3,2011

DB2:

App#,ProcessedDate

1,2014

2,2012

3,2012

so as per your request you are thinking to select some date from DB1 may be 2013 and it should show Data according for App# = 1 from DB1 and DB2 which is 2014's.

If so you can keep DB1 & DB2 tables seperate and create a calendar on DB1 date field so you will see 3 tables

Calendar , DB1 table  which are linked with Date and DB1 table and DB2 table will be linked by App#.

let me know if my assumption is wrong...

Not applicable
Author

Hi Phaneendra,

Thanks for your reply... but my my scenario is different..

If i select calender year 2013 then they should give 2 from DB1 and if there is dome data available in DB2 for the same year then that data. because there may be possibility that 1 Application No have many Dates...

Regards,

Yojas

phaneendra_kunc
Partner - Specialist III
Partner - Specialist III

not sure i understand correctly...perhaps i am missing some thing..

what is the relation 2013 to your DB1? looking for the key from your calendar to DB1..

if you could through a sample data that would be great..

Not applicable
Author

Hi Phaneendra,

If i have 1 report purely based on data in DB2 but without App# then if i select calender year =2012 which is generated from Date field in DB1 then even if there is data in DB2 it will show me null record... that's why I want to generate a calender on the basis of both Date fields in DB1 & DB2 so that such situations should get avoided...

Regards,

Yojas

Not applicable
Author

Hi yojas,

U can try taking min & max date of DB1 and min & max date of DB2 then take min & max of  these dates and generate calender on this.

And link this calender to your DB date fields.

If possible give sample app.

HTH

-Shruti

Not applicable
Author

Hi Shruti,

That min & Max will be only to generate calender but I can not link that calender to two separate DB because i f i do so then it will generate loop because of two links in Calender.

Is there any other Solution?

Regards,

Yojas

Not applicable
Author

Hi,

Can u try to concatenate those 2 DBs. Here im assuming those are two fact tables.

-Shruti

Not applicable
Author

Hi All,

I got one solution for it...

I'll concatenate DB1 & DB2 on the basis of App# and Date then i'll create calender link on the basis of that date field.

And to separate data I am going to use Flags ..

Still you can suggest if You think there is any other possible ways of doing it...

Thanks ....

Regards,

Yojas