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

Select date in two fields

I have two different tables

TableA:

ID,

Sale Date

Amount

 

TableB:

ID,

Dividend Date,

Source

 

Both tables are connected using 'ID' as key.

I want to enable users to select a date in 'Sale Date' and the same date has to be selected in 'Dividend Date'. When this happens, the user see all the Amount for the specific date and Source for the same date.

How do I do this without connecting Sale Date and Dividend Date as this creates Synthetic keys?

Labels (2)
8 Replies
edwin
Master II
Master II

given the limited information on requirements, i would say a quick way to solve this is instead of these being two separate tables, concatenate them and add a new field say FactSource to differentiate the two data sets.  lots of possible spin off solutions after that. 

1 you can rename both date fields as DATE - thus you have a single date field;

2 or you can have separate date fields and build a bridge to the calendar and in the bridge add a DATE TYPE field. 

if you are not comfortable with the bridge try the solution #1, also given the limited requirements, id say sol #1

 

qlikwiz123
Creator III
Creator III
Author

Hi,

1 you can rename both date fields as DATE - thus you have a single date field;

I can't do this as both tables already have 'ID' in common, thus making it as a key. If I rename both date fields as DATE, then it will be a synthetic key

dapostolopoylos
Creator III
Creator III

 

Check out the solution that i uploaded.

It is based on the trigger functionality

dapostolopoylos_0-1599727471485.png

 

 

Father/Husband/BI Developer
qlikwiz123
Creator III
Creator III
Author

Hi,

I did this too, but Triggers don't work on Access Point (For most part). So this is not reliable

edwin
Master II
Master II

You missed one critical point, dont create two tables, concatenate them

qlikwiz123
Creator III
Creator III
Author

Hi,

I got that. But if I concatenate, the rows will be doubled. 

Every ID will have two rows, one with Sale Date and another with Dividend Date. But if this is the only way, I may have to think

Brett_Bleess
Former Employee
Former Employee

Couple of Design Blog posts that may be helpful in this case:

https://community.qlik.com/t5/Qlik-Design-Blog/Synthetic-Keys/ba-p/1472634

https://community.qlik.com/t5/Qlik-Design-Blog/Concatenate-vs-Link-Table/ba-p/1467569

https://community.qlik.com/t5/Qlik-Design-Blog/Canonical-Date/ba-p/1463578

Hopefully those may help you move it forward further.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
edwin
Master II
Master II

 But if I concatenate, the rows will be doubled. 

your rows ARE already doubled albeit in two separate tables.